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

Hoss Man commented on SOLR-445:
-------------------------------

bq. . The errors are managed by an UpdateRequestProcessor that must be added 
before other processors in the chain.

Off the cuff: this sounds like a great idea.

The on piece of feedback that occurred to me though would be to tweak the 
response format so that there is a 1-to-1 correspondence of documents in the 
initial request to statuses in the response -- even if the schema doesn't use 
uniqueKey...

{code}
<lst name="responseHeader">
  <int name="numErrors">10</int>
  <lst name="results">
    <!-- if schema has uniqueKeys, they are the names of the response -->
    <lst name="42" /> <!-- success so empty -->
    <lst name="1"> <!-- 2nd doc in update, with uniqueKey of 1 had this failure 
-->
      <str name="message">ERROR: [doc=1] Error adding field 'weight'='b' 
msg=For input string: "b"</str>
    </lst>
    <lst name="60" /> <!-- success so empty -->
    <lst name="3"> <!-- 4th doc in update, with uniqueKey of 3 had this failure 
-->
      <str name="message">ERROR: [doc=3] Error adding field 'weight'='b' 
msg=For input string: "b"</str>
    </lst>
...
  <int name="status">0</int>
  <int name="QTime">17</int>
</lst>

{code}

?

> Update Handlers abort with bad documents
> ----------------------------------------
>
>                 Key: SOLR-445
>                 URL: https://issues.apache.org/jira/browse/SOLR-445
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>    Affects Versions: 1.3
>            Reporter: Will Johnson
>             Fix For: 4.8
>
>         Attachments: SOLR-445-3_x.patch, SOLR-445-alternative.patch, 
> SOLR-445.patch, SOLR-445.patch, SOLR-445.patch, SOLR-445.patch, 
> SOLR-445_3x.patch, solr-445.xml
>
>
> Has anyone run into the problem of handling bad documents / failures mid 
> batch.  Ie:
> <add>
>   <doc>
>     <field name="id">1</field>
>   </doc>
>   <doc>
>     <field name="id">2</field>
>     <field name="myDateField">I_AM_A_BAD_DATE</field>
>   </doc>
>   <doc>
>     <field name="id">3</field>
>   </doc>
> </add>
> Right now solr adds the first doc and then aborts.  It would seem like it 
> should either fail the entire batch or log a message/return a code and then 
> continue on to add doc 3.  Option 1 would seem to be much harder to 
> accomplish and possibly require more memory while Option 2 would require more 
> information to come back from the API.  I'm about to dig into this but I 
> thought I'd ask to see if anyone had any suggestions, thoughts or comments.   
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to