I talked to some people that need another sorting-option as well. At the moment, it is not possible to sort custom out-of-the-box.
I don't need such a feature right now, but it would be a nice-to-have. If there is some more interest on the mailing list, I will register at the JIRA and open an issue for it. The magic behind the current facet-implementation is, that it works with DocSets - an unordered Set of Documents. If we would translate the current implementation into a DocList-based one and make the needed changes at the FacetComponent (perhaps we rename it as extendedFacetComponent) than we can sort the facets in the same order of those Documents that belongs to the facets. I.e: Facet-Field: cat The response of a query looks like: Doc1: Name: "My Name is Richard", Cat: "Comedy" Doc2: Name: "The Empire Strikes Back", Cat: "Science-Fiction" Doc3: Name: "Episode II - Attack of the Clones", Cat: "Science-Fiction" Doc4: Name: "American Pie III", Cat: "Comedy" ... The facet would look like: "comedy, Science-Fiction" because the comedy-facet occurs before the Science-Fiction facet in the response list. I think this would have a good performance. Perhaps we can sum-up some scores of the top-n results to fine-tune the facet-response. One thing that keeps me away from doing such customization is, that I am relatively new to Java and debugging such changes is extremely expensive to me, because I don't know how to do so with Eclipse (I am new to Eclipse, too). If there are some good references for tutorials that deal with such topics, please, feel free to show them. Until now I haven't found some helpful ones. The sooner I can help our community to improve Solr productively, the better. But that's something that does not belong to your topic, of course :-). Kind regards, - Mitch -- View this message in context: http://lucene.472066.n3.nabble.com/Sorting-on-Facet-Fields-tp838958p839580.html Sent from the Solr - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org