lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MitchK <>
Subject Re: Sorting on Facet Fields
Date Mon, 24 May 2010 13:03:40 GMT

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


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:
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

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:
Sent from the Solr - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message