Shawn Heisey created SOLR-8770:
----------------------------------

             Summary: BinaryRequestWriter interprets null object in field as 
literal "NULL" string
                 Key: SOLR-8770
                 URL: https://issues.apache.org/jira/browse/SOLR-8770
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 5.5
            Reporter: Shawn Heisey


>From what I've been able to determine, if a null object is added with 
>SolrInputDocument#addField, the xml writer does not include that field in the 
>request, but the binary writer sends the literal string "NULL".

This became apparent when upgrading SolrJ to 5.5, which uses the binary writer 
by default.  Switching back to 5.4.1 fixed it, until I forced the 5.4.1 client 
to use the binary writer.  My source data is MySQL.  JDBC is where the null 
objects are coming from.

Adding a null check to my doc.addField call has fixed my program with the 5.5 
client, but this is likely to catch other upgrading users off guard.

At the very least, the 5.5.1 CHANGES.txt file needs a note, but I believe the 
behavior of the binary writer should match the behavior of the xml writer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to