+1 for this. Some use cases: * JIRA issue sorting * Log level sorting * User role sorting ...
Doable at Lucene level by any chance? Otis -- Solr & ElasticSearch Support -- http://sematext.com/ Performance Monitoring -- http://sematext.com/spm On Wed, Jul 24, 2013 at 12:15 PM, Elran Dvir <elr...@checkpoint.com> wrote: > Hi All, > > We have encountered a use case in our system where we have a few fields > (Severity. Risk etc) with a closed set of values, where the sort order for > these values is pre-determined but not lexicographic (Critical is higher than > High). Generically this is very close to how enums work. > > To implement, I have prototyped a new type of field: EnumField where the > inputs are a closed predefined set of strings in a special configuration > file (similar to currency.xml). > I'm thinking of contributing the code back since I think it's a nice little > feature that other people may like to use and would like to get some feedback > from the community. > > If there's positive feedback, I'll open an issue with a patch for the > functionality. > > Thanks.