There is Lucene faceting module, which doesn't do anything in common with Solr, but it looks like it has something what you are looking for. http://shaierera.blogspot.com/2012/11/lucene-facets-part-1.html
On Thu, May 16, 2013 at 1:33 AM, Jan Morlock <jan.morl...@googlemail.com>wrote: > Hi, > > we are using faceted search for our queries. However neither sorting by > count nor sorting by index as described in [1] is suitable for our business > case. Instead, we would like to have the facets (or at least the beginning > of them) sorted by the score of the top document possessing the > corresponding facet. The expected behaviour can be compared to what the > result grouping feature does (see [2]). > > I am currently thinking about the following strategy: > (1) Create a new search component > (2) Perform a sub-query using grouping > (3) Use the result of this sub-query in order to sort the facets of the > actual query. > > Currently step no. 2 seems to be pretty difficult. Can anybody point a me > to > an example, where a sub-query is performed in order to retrieve the groups? > Or does anybody have a better/easier strategy for achieving this? > > Any help is appreciated. > Thank you very much in advance. > > Best regards > Jan > > [1]: http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort > [2]: http://wiki.apache.org/solr/FieldCollapsing > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Sorting-facets-by-relevance-tp4063649.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>