Issue 13191

Use string based enums in SOLR instead of ordinals

13191
Reporter: trobertson
Assignee: fmendez
Type: Improvement
Summary: Use string based enums in SOLR instead of ordinals
Priority: Minor
Resolution: Fixed
Status: Resolved
Created: 2013-05-29 11:40:40.603
Updated: 2014-02-10 10:34:00.004
Resolved: 2014-02-10 10:30:17.551
        
Description: Unlike occurrence and registry, CLB uses ENUM ordinals in SOLR.  This is not particularly safe over time (ordinals are unstable unless strict processes observed).  We would like to address this by using strongly declared Int's or using the ENUM value itself, which is (slightly) more robust.

We decided this, on stumbling upon this rooted in the common search project which renders the common-search difficult for more use.  [~fmendez] is making that a configurable option however:
https://code.google.com/p/gbif-common-resources/source/browse/gbif-common-search/trunk/src/main/java/org/gbif/common/search/builder/SolrQueryBuilder.java#345
]]>
    


Author: fmendez@gbif.org
Comment: http://code.google.com/p/gbif-common-resources/source/detail?r=1544
Created: 2013-05-29 12:19:57.92
Updated: 2013-05-29 12:19:57.92


Author: mdoering@gbif.org
Comment: we still use a mix of ordinals and strings to store enums in solr, this issue is about a consistent approach in storing
Created: 2013-05-29 13:24:36.409
Updated: 2013-05-29 13:24:36.409


Author: mdoering@gbif.org
Comment: Not sure if enum names are more stable than their ordering. For that reason I would prefer to use the more efficient int based indexing
Created: 2014-02-10 10:34:00.004
Updated: 2014-02-10 10:34:00.004