Hello,

We need to order solr search results according to specific rules. 


I will explain with an example. Let say solr returns 1000 results for query 
"sport". 
These results must be divided into three buckets according to rules that come 
from database. 
Then one doc must be chosen from each bucket and put in the results 
subsequently until all buckets are empty.


One approach was to modify/override solr code where it gets results, sorts them 
and return #rows of elements.
However, from the code in Weight.java scoreAll function we see that docs have 
only internal document id and nothing else. 


We expect unique solr document id in order to match documents with the custom 
scoring.
We also  see that Lucene code handles those doc ids to scoreAll function, and 
for now We do not want to modify Lucene code
 and prefer to solve this issue as a Solr  plugin .


Any ideas are welcome.




Thanks.
Alex. 




Reply via email to