thomaswoeckinger commented 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:
us...@infra.apache.org



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

Reply via email to