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

Hoss Man updated SOLR-1870:
---------------------------

    Attachment: SOLR-1870-test.patch
                SOLR-1870.patch

Noble: the newly updated SOLR-1870-test.patch demonstrates the concern i have 
for your fix: if the JavaBinCodec has support for Iterator and Iterable, but 
the JavaBinUpdateRequestCodec makes assumptions about Iterators only being used 
for streaming docs, then if people add Field values containing Custom objects 
that implement Iterable but are not actually Collection then the 
JavaBinUpdateRequestCodec will marshal them correctly, but it will have a 
ClassCastException when unmarshaling them -- ditto for people who want to add 
lazy Iterators as field values.

I don't disagree that making JavaBinCodec support Collection is a good idea in 
general, but it doesn't fix the root problem -- i think we need both changes.

The latest SOLR-1870.patch incorporates both my suggested fix for 
JavaBinUpdateRequestCodec, as well as your change to JavaBinCodec (with my 
suggested tweak of replacing List with Collection in the if tree), and all of 
the tests i've previously posted (ie: SOLR-1870-test.patch is for illustrative 
purposes only, it's not needed)

what do you think?

> Binary Update Request (javabin) fails when the field type of a multivalued 
> SolrInputDocument field is a Set (or any type that is identified as an 
> instance of iterable) 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1870
>                 URL: https://issues.apache.org/jira/browse/SOLR-1870
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java, update
>    Affects Versions: 1.4
>            Reporter: Prasanna Ranganathan
>             Fix For: 1.4.1, 3.1, 4.0
>
>         Attachments: SOLR-1870-test.patch, SOLR-1870-test.patch, 
> SOLR-1870.patch, SOLR-1870.patch, SOLR-1870.patch
>
>
> When the field type of a field in a SolrInputDocument is a Collection based 
> on the Set interface, the JavaBinUpdate request fails. It works when sending 
> the document data over XML.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to