Latest versions of Solr have collapsing and expanding plugins, reranking plugins and post-filters. Some combinations of these seem like it might be relevant.
And, of course, there is always carrot2 clustering. Regards, Alex. Personal: http://www.outerthoughts.com/ and @arafalov Solr resources and newsletter: http://www.solr-start.com/ and @solrstart Solr popularizers community: https://www.linkedin.com/groups?gid=6713853 On 3 November 2014 18:07, <alx...@aim.com> wrote: > 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. > > > >