You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/25 06:56:25 UTC

[GitHub] [lucene-solr] thomaswoeckinger edited a comment on pull request #2426: SOLR-15191: Fix faceting on EnumFieldType

thomaswoeckinger edited a comment on pull request #2426:
URL: https://github.com/apache/lucene-solr/pull/2426#issuecomment-785663364


   > Instead of the instanceof checks (kinda brittle code-smell, not flexible), maybe we can call `FieldType.getNumberType() != null` ?
   >
   That is already done in FacetFieldProcessorByHashDV.calcFacets which is the only position which is using this method, and i agree with you it's kind of a code smell.
   
   There are two alternatives (i don't really like one of them):
   
   a.) Move the getNumberType()!=null check into the method but than i have to catch the exception outside or breaking the behavior.
   
   b.) Copy only the switch case statement to FacetFieldProcessorByHashDV.calcFacets.
    
   > Can you please run all tests, e.g. `/gradlew check`
   
   I already run ant test, there are no test failures.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org