elasticsearch/elasticsearch — pull request #2337 by jprante (2012-10-18 16:22:28+00:00)
Title: Adding collator-based sorting for terms facet entries

Hi,

here is a non-ICU feature extension for the standard ES terms facets, which may be useful in linguistic applications.

Right now it is not possible to sort names in facet entries according to locale settings. So I have added a subpackage org.elasticsearch.search.facet.terms.comparator with a set of comparator classes. One comparator is based on java.util.Collator. Some new parameters can be given to a facet query: "locale", "rules", "strength", and "decomp".

Test case is included in TermsFacetCollationTests.java for german and french sorting, also a rule-based demo.

Cheers, Jörg