Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C6A5F709 for ; Tue, 13 Aug 2013 11:14:52 +0000 (UTC) Received: (qmail 3845 invoked by uid 500); 13 Aug 2013 11:14:50 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 3658 invoked by uid 500); 13 Aug 2013 11:14:50 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 3593 invoked by uid 99); 13 Aug 2013 11:14:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Aug 2013 11:14:49 +0000 Date: Tue, 13 Aug 2013 11:14:48 +0000 (UTC) From: "Erick Erickson (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-5084) new field type - EnumField MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-5084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13738092#comment-13738092 ] Erick Erickson commented on SOLR-5084: -------------------------------------- @Elran bq: Why do you say the assumption is the type is restricted to single value?... Parts of the discussion mentioned sorting, which is undefined on multivalued fields. If sorting is _required_ for an enum-type field then it shouldn't be mutliValued. There's no reason it _needs_ to be restricted to single values, it's fine for the enum type to be just like any other field; it's up to the user to only put one value in the field if it's to be used to sorting. Mostly getting it straight in my head what the characteristics are, not saying it _should_ be single-valued-only... Erick > new field type - EnumField > -------------------------- > > Key: SOLR-5084 > URL: https://issues.apache.org/jira/browse/SOLR-5084 > Project: Solr > Issue Type: New Feature > Reporter: Elran Dvir > Attachments: enumsConfig.xml, schema_example.xml, Solr-5084.patch, Solr-5084.patch, Solr-5084.patch > > > 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). > The code is based on 4.2.1. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org