Thanks Koji! Using the elevate request handler worked.
Is there a way to use the QueryElevationComponent in the default search handler? I added the following: <bool name="enableElevation">true</bool> <bool name="forceElevation">true</bool> to <requestHandler name="standard" class="solr.SearchHandler">, so the result looked like <requestHandler name="standard" class="solr.SearchHandler"> <!-- default values for query parameters --> <lst name="defaults"> <str name="echoParams">explicit</str> <bool name="omitHeader">true</bool> <bool name="enableElevation">true</bool> <bool name="forceElevation">true</bool> <!-- <int name="rows">10</int> <str name="fl">*</str> <str name="version">2.1</str> --> </lst> </requestHandler> But, this didn't work when doing a default search http://localhost:8983/solr/select/?q=thanks+giving Is there a method to make this default? Thank you! Michael Herchel Network Administrator Florida High School Athletic Association http://www.fhsaa.org (352) 372-9551 x120 | mherc...@fhsaa.org ---------- Become a FHSAA Official! Earn part-time income! Your local high schools need umpires and referees. http://www.BecomeAnOfficial.org -----Original Message----- From: Koji Sekiguchi [mailto:k...@r.email.ne.jp] Sent: Thursday, November 10, 2011 5:31 PM To: solr-user@lucene.apache.org Subject: Re: I cannot get elevate.xml to work with Apache Solr (1.41) (11/11/11 4:15), Michael Herchel wrote: > I've searched high and low for this via Google and the Solr wiki page, and > cannot find the answer. > > My problem: > ----------- > > I'm having trouble getting the elevate.xml working. Here's what it currently > looks like: > > <elevate> > <query text="thanks giving"> > <doc id="9c3ec5/node/3564" /> > </query> > </elevate> > >> From what I understand, this should work. According to >> http://wiki.apache.org/solr/SchemaXml#The_Unique_Key_Field, I need to have >> the unique key defined in the schema.xml. I checked this and I do have it: > > <uniqueKey>id</uniqueKey> > > I found the "9c3ec5/node/3564" by doing a search directly off the Solr server > (http://localhost:8983/solr/admin/) and finding the ID of the document that I > wanted from the generated XML. Here is what the result of my search, so you > can see where I got the ID from. > > <result name="response" numFound="2" start="0"> > <doc> > <str name="body"> > --content here -- > </str> > <date name="changed">2011-08-31T19:42:15Z</date> > <int name="comment_count">0</int> > <date name="created">2011-08-16T13:18:00Z</date> > <str name="entity">node</str> > <str name="hash">9c3ec5</str> > <str name="id">9c3ec5/node/3564</str> > > I have verified that elevate.xml is being loaded. When I start Solr manually > (java -Dsolr.solr.home=c:/solr/ -jar start.jar), I do see the elevate.xml is > being loaded: > > INFO: Loading QueryElevation from: c:\solr\conf\elevate.xml Nov 10, 2011 > 11:11:24 AM org.apache.solr.handler.component.SearchHandler inform INFO: > Adding component:org.apache.solr.handler.component.QueryComponent@7bfbcffa > > I also restart the Solr service after making any changes to elevate.xml. Is > this enough? Do I need to reindex or do anything else? Michael, You need to check solrconfig.xml that you have QueryElevationComponent defined like this: <searchComponent name="elevator" class="solr.QueryElevationComponent" > <!-- pick a fieldType to analyze queries --> <str name="queryFieldType">string</str> <str name="config-file">elevate.xml</str> </searchComponent> Additionally, the search component (named "elevator" hare) should be defined in your request handler: <!-- A request handler for demonstrating the elevator component --> <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy"> <lst name="defaults"> <str name="echoParams">explicit</str> </lst> <arr name="last-components"> <str>elevator</str> </arr> </requestHandler> Finally, you need to use the request handler when you request: http://localhost:8983/solr/elevate?q=thanks giving And no, you do not need to reindex to get work QueryElevationComponent. koji -- Check out "Query Log Visualizer" for Apache Solr http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html http://www.rondhuit.com/en/