I want to retrieve some documents from SOLR and pass boosts to the field's so that they are returned in the order I request them (respectively the web request requests them). Therefore I add boosts to the desired ids:
q=myfield:"9125129"^10 OR
myfield:"9125417"^9 OR
myfield:"9124611"^8 OR
myfield:"9126980"^7 ...
fl=myfield
wt=csv
Unfortunately, this does not return the documents in the desired order:
myfield
9125129
9125417
9126980
9124611
If I change the query to
q=myfield:"9125129"^9 OR
myfield:"9125417"^8 OR
myfield:"9124611"^7 OR
myfield:"9126980"^6 ...
fl=myfield
wt=csv
(just for testing), the correct order is returned:
myfield
9125129
9125417
9124611
9126980
So it seems like SOLR does not like the double-digit boost value? But according to the spec this shouldn't be a problem. So what is actually the problem here and how can i request boosted fields with more than 10 documents?
Used SOLR version: 4.10.4
debugQuery=true
to your request - this will give you all the debug information necessary. When you're changing the boost values, it might just switch the position of the documents if score the score is non-constant - since you're usingq
, the score will be calculated for each document based on the queried term, and the scores may not be identical for each document (for example if they're spread out over several nodes, since each node may have a different number of docs). AppendingdebugQuery=true
(debug=query
ordebug=all
in newer versions of Solr) will show you the score calc – MatsLindh