munendrasn commented on a change in pull request #1775:
URL: https://github.com/apache/lucene-solr/pull/1775#discussion_r475199998



##########
File path: solr/core/src/java/org/apache/solr/schema/TrieLongField.java
##########
@@ -56,7 +56,7 @@ public Object toNativeType(Object val) {
     if(val==null) return null;
     if (val instanceof Number) return ((Number) val).longValue();
     try {
-      if (val instanceof CharSequence) return Long.parseLong(val.toString());
+      if (val instanceof CharSequence)return (long) 
Double.parseDouble(val.toString());

Review comment:
       I think we need to check this in createField, not in toNativeType




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to