lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alx...@aim.com
Subject custom sorting of search result
Date Mon, 03 Nov 2014 23:07:18 GMT
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. 





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message