0

Is it possible to specify an additive boost for a set of documents (given a set of document ids) at query time for the extended dismax handler?

I was planning to use bq with an OR'ed list of ids but apparently bq's boost is not additive.

axk
  • 5,316
  • 12
  • 58
  • 96

1 Answers1

0

I think query elevation may help :http://wiki.apache.org/solr/QueryElevationComponent

Look into : forceElevation

By default, this component respects the requested 'sort' parameter -- that is, if the request asks to sort by date, it will order the results by date. If forceElevation=true, results will first return the boosted docs, then order by date.

Have elevate.xml

<elevate>

 <query text="AAA">
  <doc id="A" />
  <doc id="B" />
 </query>

 <query text="ipod">
  <doc id="A" />

  <!-- you can optionally exclude documents from a query result -->
  <doc id="B" exclude="true" />
 </query>

</elevate>
Arun
  • 1,777
  • 10
  • 11
  • This doesn't change the score and affects sorting directly bypassing the score, right? Also as far as I understand it doesn't allow specifying the list of doc ids at request time, only a pre-configured one. – axk Jan 20 '14 at 18:16
  • Yes. Please play with it and let you know what you find. – Arun Jan 20 '14 at 23:49