lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1162) SolrJ UpdateRequest does not maintain order of operations when sending mixed types of changes (updates, delete id, delete query, update iterator)
Date Thu, 14 May 2009 13:30:46 GMT

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

Noble Paul commented on SOLR-1162:
----------------------------------

we need a revamp of the JavaBinUpdateRequestCodec .

The way the deserialization is done is not safe . 
{code:java}

          if (name.equals("params")) {
            NamedList parmsAsList = (NamedList)val;
            ModifiableSolrParams parms = namedListToSolrParams(parmsAsList);
            updateRequest.setParams(parms);
          }
          else if (name.equals("delById")) {
            List<String> delIds = (List<String>)val;
            streamer.deleteById(delIds);
          }
          else if (name.equals("delByQ")) {
            String delQuery = (String)val;
            streamer.deleteByQuery(delQuery);
          }
{code}

may break if there are other objects with these names . I can provide a true streaming unmarshaller
for JavabinCodec

Let us change the method
{code:java}
public UpdateRequest unmarshal(InputStream is, final StreamingDocumentHandler handler)
{code}
to 
{code:java}
public void unmarshal(InputStream is, final StreamingDocumentHandler handler)
{code}
and make the handler mandatory. so it does not have to worry about the type of Object



> SolrJ UpdateRequest does not maintain order of operations when sending mixed types of
changes (updates, delete id, delete query, update iterator)
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1162
>                 URL: https://issues.apache.org/jira/browse/SOLR-1162
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - java
>    Affects Versions: 1.3
>            Reporter: Jayson Minard
>         Attachments: Solr-1162.patch, Solr-1162.patch
>
>
> In SolrJ UpdateRequest object it maintains separate lists of documents to add, delete,
and delete queries so that the order of those operations is not known to the caller.  It really
should execute the items in the same order they were added to the UpdateRequest.

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


Mime
View raw message