lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [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)
Date Tue, 25 May 2010 16:20:27 GMT

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

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

bq. Iterator was created as a special type in javabin codec so that items can be streamed.
Any collection should have been written as a List of specific size.

I'm confused ... if Iterator support was only ever ment to be "special" for streaming items,
then why did writeKnownType have support for Iterator?  and why did JavaBinUpdateRequestCodec
override the default behavior of readIterator to treat it special?

As far as your patch goes: instead of adding a new "if (val instanceof Collection)" test to
writeKnownType, shouldn't you replace the existing "instanceof List" with "instanceof Collection"
?

I'm still not understanding all of this, but it also seems like *both* patches would be a
good idea -- your change ensures that all Collections are serialized as an Array, but it still
leaves open the possibility of a bug if someone tries to use the codec to stream something
which is *not* a Collection but is Iterable.  perhaps that was not originally ment ot be supported,
but is there any harm in it?  is the special case behavior for Iterators for streaming used
in a way besides the "top level" docs iterator that i mentioned?

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


Mime
View raw message