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>

Reply via email to