You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2010/05/19 23:59:56 UTC

[jira] Commented: (SOLR-1870) 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)

    [ https://issues.apache.org/jira/browse/SOLR-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869372#action_12869372 ] 

Hoss Man commented on SOLR-1870:
--------------------------------

Tracing through this code, i don't think the bug is happening when the stream is being *written* ... writeIterator is fairly straightforward.

What makes no sense to me is that in JavaBinUpdateRequestCodec, the unmarshall function declares an anonymous subclass of JavaBinCodec where the readIterator has a hardcoded assumption that every object it encounters in an "ITERATOR" sequence will be a List<NamedList> which it can then convert into a SolrInputDocument.

based on the stack trace, these seems like an abuse of the codec format -- it knows that at the "top level" there will be an Iterator of docs, so it overwrites that method in this way, ignorant of the possibility that there might be other purposes for an Iterator in the stream (like a Set of values for a field)



> 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
>         Attachments: SOLR-1870-test.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org