You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alessandro Benedetti (Jira)" <ji...@apache.org> on 2021/01/27 16:11:03 UTC

[jira] [Updated] (SOLR-15112) SolrJ DocumentObjectBinder.toSolrInputDocument null handling

     [ https://issues.apache.org/jira/browse/SOLR-15112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessandro Benedetti updated SOLR-15112:
----------------------------------------
    Description: 
Currently the:
org.apache.solr.client.solrj.beans.DocumentObjectBinder#toSolrInputDocument
method doesn't handle nulls in java objects very well.

Even if the field is null in the Java Object, the binder adds the field(with the null value) to the SolrInputDocument.

This may cause issues down the line, for example using UpdateRequestProcessors such as the UUIDUpdateProcessorFactory (which doesn't check the value of the field, but it just checks if a field is present)

The proposal here is to make the binder NOT add null fields to the SolrInputDocument.

Any objection is welcome (took this list of committers from some of the latest contributors to the class):
[~noble] [~noble.paul] [~erick][~erickerickson][~jpountz]

  was:
Currently the:
org.apache.solr.client.solrj.beans.DocumentObjectBinder#toSolrInputDocument
method doesn't handle nulls in java objects very well.

Even if the field is null in the Java Object, the binder adds the field(with the null value) to the SolrInputDocument.

This may cause issues down the line, for example using UpdateRequestProcessors such as the UUIDUpdateProcessorFactory (which doesn't check the value of the field, but it just checks if a field is present)

The proposal here is to make the binder NOT add null fields to the SolrInputDocument.

Any objection is welcome


> SolrJ DocumentObjectBinder.toSolrInputDocument null handling
> ------------------------------------------------------------
>
>                 Key: SOLR-15112
>                 URL: https://issues.apache.org/jira/browse/SOLR-15112
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 8.7
>            Reporter: Alessandro Benedetti
>            Priority: Minor
>         Attachments: Screenshot 2021-01-27 at 16.07.13.png
>
>
> Currently the:
> org.apache.solr.client.solrj.beans.DocumentObjectBinder#toSolrInputDocument
> method doesn't handle nulls in java objects very well.
> Even if the field is null in the Java Object, the binder adds the field(with the null value) to the SolrInputDocument.
> This may cause issues down the line, for example using UpdateRequestProcessors such as the UUIDUpdateProcessorFactory (which doesn't check the value of the field, but it just checks if a field is present)
> The proposal here is to make the binder NOT add null fields to the SolrInputDocument.
> Any objection is welcome (took this list of committers from some of the latest contributors to the class):
> [~noble] [~noble.paul] [~erick][~erickerickson][~jpountz]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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