[ https://issues.apache.org/jira/browse/SOLR-8945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280443#comment-15280443 ]
Binoy Dalal commented on SOLR-8945: ----------------------------------- Garth, I've reviewed this issue from the perpective of changing the code. The exception is thrown by a general catch i.e., {code}catch( Exception ex ){code} in DocumentBuilder.java Since this is a blanket catch for a lot of different runtime exceptions, I don't think that changing this for one particular case makes sense, and the cause is already being thrown. It's just less readble is all. So, I think that you should close this issue. > When numerical field is sent an incorrect data type, exception could be more > descriptive. > ----------------------------------------------------------------------------------------- > > Key: SOLR-8945 > URL: https://issues.apache.org/jira/browse/SOLR-8945 > Project: Solr > Issue Type: Improvement > Reporter: Garth Grimm > Priority: Minor > > While indexing from a database, solr automatically created some id fields as > `tlong`. These fields could either contain a number or a message like 'Not > Available' if that particular id/number was not present. > In such a case, solr threw an error similar to: > ERROR: [doc=People-139728] Error adding field 'Office_PhoneNo'='603 103' > msg=For input string: "603 103" > In such a case, the intuitive thing would be to throw a NumberFormatException > so that the user can easily figure out that a number field is receiving > non-numeric values. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org