[ https://issues.apache.org/jira/browse/SOLR-5084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734159#comment-13734159 ]
Hoss Man commented on SOLR-5084: -------------------------------- Elran: 1) there's still several sections in your patch that have a lot of reformatting making it hard to see what exactly you've added. (I realize that the formatting may not be 100% uniform in all of these files, but the key to making patches easy to read is not to change anything that does't *have* to be changed ... formatting changes should be done seperately and independently from functionality changes) 2) could you please add a few unit tests to show how the type can be used when indexing/querying/faceting/returning stored fields so it's more clear what this patch does? 3) I'm not sure that it makes sense to customize the response writers and the JavaBinCodec to know about hte enum values -- it seems like it would make a lot more sense (and by much simpler) to have clients just treat the enum values as strings 4) a lot of your code seems to be cut/paste from TrieField ... why can't the EnumField class subclass TrieField to re-use this behavior (or worst case: wrap a TrieIntField similar to how TrieDateField works) > 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 > > > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org