munendrasn commented on pull request #2056: URL: https://github.com/apache/lucene-solr/pull/2056#issuecomment-721133321
> As PR is open, sharing the comment here instead of JIRA I was able to reproduce the issue with the script shared in JIRA. Regarding the approach, I agree SolrInputDocument returning field values in the actual type even for uncommitted docs is a better solution (approach 1) but currently not sure of the impact I was able to reproduce the same issue with `add-distinct` atomic operation too. `add`, `set` doesn't have this problem. I think `removeregex` might have the same issue but I'm assuming this operation would be used with string/text fields, so probably not an issue? 🤔 Coming to the PR, * This doesn't handle the case when the original values are passed as string. Suppose `values: ["2", "3"]`, then uncommitted doc would contain values as a string (This can happen if the users are using XML format (older version of solrJ sends update docs in XML format, not sure of the latest). In such cases, it will still not work * would the PR support date fields type too? I think to handle these cases, we need to convert the existing values to native types using Something like this but not sure of performance overhead in case of large fields ```java Collection<Object> original = existingField.getValues(); original.stream().map(val -> sf.getType().toNativeType(object)).collect(Collectors.toList()) ``` ---------------------------------------------------------------- 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