Thanks Ryan for your answer. >The only thing that may be weird is that if you id field is named "myid", your elevate.xml file still refers to "id" as the unique key. Is that what you are refering to?
yes, my id field is named "myid", but elevate.xml expects its name is "id" . Please find below more info: I' using the very last revision (720030) I also tried both <elevate> <query text="cars"> <doc myid="77b81d932353a5d16880043bdb4fe22b"/> </query> </elevate> and <elevate> <query text="cars"> <doc id="myid:77b81d932353a5d16880043bdb4fe22b"/> </query> </elevate> In the former case I've got a tomcat error: HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: <abortOnConfigurationError>false</abortOnConfigurationError> in solr.xml ------------------------------------------------------------- org.apache.solr.common.SolrException: Error initializing QueryElevationComponent. at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:200) at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:319) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:563) at ... In the latter case solr works but the QueryElevation does not. The query I' using is: http://localhost:8080/solr/post1/select/?q=cars&version=2.2&start=0&rows=10&indent=on&enableElevation=true thanks Paolo On Sun, Nov 23, 2008 at 12:29 AM, Ryan McKinley <[EMAIL PROTECTED]> wrote: > hymm -- that *should* not be the case. The id field in > QueryElevationComponent uses the globally defined field: > > SchemaField sf = core.getSchema().getUniqueKeyField(); > ... > idField = sf.getName().intern(); > > The only thing that may be weird is that if you id field is named "myid", > your elevate.xml file still refers to "id" as the unique key. Is that what > you are refering to? > > I have not tested this, so it may very well be broken. > > ryan > > > > > On Nov 22, 2008, at 5:31 PM, Paolo Ruscitti wrote: > > I have a question about QueryElevationComponent. >> >> I'm trying to use it but it seems it works properly if, and only if, the >> id >> field name in <uniqueKey> definition is '*id*'. >> >> so if I have <uniqueKey>*myid*</uniqueKey>, it does not work. >> >> >> Could you please tell me what I'm doing wrong? >> thaks a lot >> >> Paolo >> >> - this is my elevate.xml >> >> <elevate> >> <query text="cars"> >> <doc id="77b81d932353a5d16880043bdb4fe22b"/> >> </query> >> </elevate> >> >> - I added at the tail of solrconfig.xml file >> ... >> >> <!-- a search component that enables you to configure the top results for >> a given query regardless of the normal lucene scoring.--> >> <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> >> >> <!-- a request handler utilizing 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> >> >> </config> >> >> - in my schema I have >> >> <field name="md" type="string" indexed="true" stored="true" >> required="true" >> /> >> ... >> <uniqueKey>myid</uniqueKey> >> > >