lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5084) new field type - EnumField
Date Wed, 18 Sep 2013 17:06:55 GMT

    [ https://issues.apache.org/jira/browse/SOLR-5084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13770970#comment-13770970
] 

Erick Erickson commented on SOLR-5084:
--------------------------------------

Rough draft comments. I won't be able to do anything more until this evening (Pacific time),
in meetings all day.


Elran

1> What do you (and others) think about putting the enum right in the schema.xml file,
perhaps as as many children of <fields><enum></enum><enum></enum></fields>
as necessary?
That would at least keep them together and not introduce a separate file.

1.5> There's still the IntelliJ headers in the new files, should be removed.

2> JavabinCodec.java
          SOLRINPUTDOC_CHILDS = 17,

  //Why is this value identical to SOLRINPUTDOC_CHILDS? It may be fine, verifying
          ENUM_FIELD_VALUE = 17,
          
3> StatsValuesFactory.updateMinMax. How does this.max ever get set to non-null?

4> EnumField.java. 
  > You have a custom field isNullOrEmpty. There's nothing wrong with this,
     but StringUtils.isBlank already takes care of this, less code to maintain.
     
  > storedToIndexed isn't referenced and, at least in trunk, doesn't show as being
    overridden (haven't checked 4x). May be OK but....
    
5> EnumFieldTest.java
  > How about a couple of tests that exercise inclusive and exclusive ranges with defined
    endpoints rather than [* TO *]?
  > The general coding practice (even though I like the leading underscore for member
    vars personally) is to not have them, please change.


                
> 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
>            Assignee: Erick Erickson
>         Attachments: enumsConfig.xml, schema_example.xml, Solr-5084.patch, Solr-5084.patch,
Solr-5084.patch, Solr-5084.patch, Solr-5084.trunk.patch, Solr-5084.trunk.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


Mime
View raw message