Boosting fields at query time in Standard Request Handler from Solrconfig.xml
Hi, I am developing a search engine app using Asp.Net, C# and Solrnet. I use the standard request handler. Is there a way I can boost the fields at query time from inside the solrconfig.xml file itself. Just like the qf field for Dismax handler. Right now am searching like field1:value^1.5 field2:value^1.2 field3:value^0.8 and this is done in the middle tier. I want Solr itself to do this using standard request handler. Can I write a similar kind of thing inside standard req handler? Here is my solrconfig file. requestHandler name=standard class=solr.SearchHandler default=true lst name=defaults str name=echoParamsexplicit/str str name=hltrue/str str name=hl.snippets3/str str name=hl.fragsize25/str str name=qffile_description^100.0 file_content^6.0 file_name^10.0 file_comments^4.0 /str /lst arr name=last-components strspellcheck/str /arr /requestHandler But am not able to see the results if I add this in my solrconfig.xml file. I have edited the post to add my req handler code in solrconfig. But, if have my query string as file_description:result^1.0 file_content:result^0.6 file_name:result^0.5 file_comments:result^0.8, am able to see the required result. Regards Vignesh
RE: problem in setting field attribute in schema.xml
It's very strange. Even I tried the same now and am getting the same result. I have set both indexed=false and stored=false. But still if I search for a keyword using my default search, I get the results in these fields as well. But if I specify field:value, it shows 0 results. Can anyone explain? Regards Vignesh -Original Message- From: Romi [mailto:romijain3...@gmail.com] Sent: 25 May 2011 18:42 To: solr-user@lucene.apache.org Subject: Re: problem in setting field attribute in schema.xml if i do stored=false then it indexes the data but not shows the data in search result. but in my case i do not want to index the data for a field and to the my surprise even if i am doing indexed=false for this field, i am still able to get that data through the query *:* but not getting the data if i run filter query as field:value, its really confusing what solr is doing. - Romi -- View this message in context: http://lucene.472066.n3.nabble.com/problem-in-setting-field-attribute-in-sch ema-xml-tp2984126p2984239.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: problem in setting field attribute in schema.xml
I tried deleting the index and trying it again. But still I get the same result. Regards Vignesh -Original Message- From: Jan Høydahl [mailto:jan@cominvent.com] Sent: 25 May 2011 19:30 To: solr-user@lucene.apache.org Subject: Re: problem in setting field attribute in schema.xml You probably get tricked by an old index which was created while you had stored=true Delete your index, restart Solr, re-index content and try again. Solr will happily serve what's in the Lucene index even if it does not match your current schema - that's why it's important to re-index everything if you make changes to the schema and you want those changes to be visible. -- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com On 25. mai 2011, at 15.47, Vignesh Raj wrote: It's very strange. Even I tried the same now and am getting the same result. I have set both indexed=false and stored=false. But still if I search for a keyword using my default search, I get the results in these fields as well. But if I specify field:value, it shows 0 results. Can anyone explain? Regards Vignesh -Original Message- From: Romi [mailto:romijain3...@gmail.com] Sent: 25 May 2011 18:42 To: solr-user@lucene.apache.org Subject: Re: problem in setting field attribute in schema.xml if i do stored=false then it indexes the data but not shows the data in search result. but in my case i do not want to index the data for a field and to the my surprise even if i am doing indexed=false for this field, i am still able to get that data through the query *:* but not getting the data if i run filter query as field:value, its really confusing what solr is doing. - Romi -- View this message in context: http://lucene.472066.n3.nabble.com/problem-in-setting-field-attribute-in-sch ema-xml-tp2984126p2984239.html Sent from the Solr - User mailing list archive at Nabble.com.
Highlighting in solr
Hi, I use Solrnet to develop a search engine. In my application, I have a field called file_contents which I use for highlighting. Am able to get the highlights without a problem. Now I need to format it. For example, if the keyword occurs multiple times in the field, I have to display it lime what google does. May be like this. GSMArena.com: Toshiba GSM cellphones. ... Toshiba phones. Toshiba. Filters. Available . Coming soon . Smartphone . Touchscreen . Camera . Bluetooth . Wi-Fi ... Multiple snippets here are separated by I need to achieve something like this. Am able to get multiple snippets. But how do I deal with the separating? Regards Vignesh
Opening a file at a page where I encounter a hit
Hi, I am using ASP.Net MVC and solrnet for my search tool. The files I index include pdf files, word docs, excel etc... I am able to search and retrieve all the docs with a hit. Now the problem lies in opening the files with a hit. When I open the file, it should open at the location where the hit is encountered. How do i manage this? It will be even more helpful if I can highlight the hit inside the opened document? Please help me in this regard. Regards Vignesh
Lazy loading error in Extracting request handler
Hi, I am new to Solr and its configuration. I need to index some pdf files and for that reason I thought of using the extractingrequesthandler. I use Apache tomcat and run solr from it. I used the following command to index a pdf file. C:\Users\vikky\Downloads\curl-7.21.0-win64-nosslcurl.exe http://localhost:8983/solr/update/extract?literal.id=doc4uprefix=attr_fma p.content=attr_contentcommit=true -F myfile=@G:\Official\Archiving\apache-solr-1.4.1\apache-solr-1.4.1\docs\featu res.pdf But, I got the following error. htmlheadtitleApache Tomcat/6.0.32 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;fo nt-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size: 12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - lazy loading error org.apache.solr.common.SolrException: lazy loading error at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHan dler(RequestHandlers.java:249) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest (RequestHandlers.java:231) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:3 38) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java: 241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http 11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: Error loading class 'org.apache.solr.handler.extraction.ExtractingRequestHandler' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:37 5) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:413) at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:449) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHan dler(RequestHandlers.java:240) ... 16 more Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.extraction.ExtractingRequestHandler at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.net.FactoryURLClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:35 9) ... 19 more /h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b ulazy loading error org.apache.solr.common.SolrException: lazy loading error at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHan dler(RequestHandlers.java:249) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest (RequestHandlers.java:231) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:3 38) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java: 241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:206) at
Indexing AutoCAD files
Hi team, Is there a way lucene can index AutoCAD files - *.dwg files? If so, please let me know. Can you please provide some insight on the same? Thanks in advance.. Regards Vignesh