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

Erick Erickson updated SOLR-445:
--------------------------------

    Attachment: SOLR-445-3_x.patch
                SOLR-445.patch

I think it's ready for review, both trunk and 3_x. Would someone look this over 
and commit it if they think it's ready?

Note to self: do NOT call initCore in a test case just because you need a 
different schema.

The problem I was having with running tests was because I needed a schema file 
with a required field so I naively called initCore with schema11.xml in spite 
of the fact that @BeforeClass called it with just schema.xml. Which apparently 
does bad things with the state of *something* and caused other tests to fail... 
I can get TestDistributedSearch to fail on unchanged source code simply by 
calling initCore with schema11.xml and doing nothing else in a new test case in 
BasicFunctionalityTest. So I put my new tests that required schema11 in a new 
file instead.

The XML file attached is not intended to be committed, it is just a convenience 
for anyone checking out this patch to run against a Solr instance to see what 
is returned.

This seems to return the data in the SolrJ case as well.

NOTE: This does change the behavior of Solr. Without this patch, the first 
document that is incorrect stops processing. Now, it continues merrily on 
adding documents as it can. Is this desirable behavior? It would be easy to 
abort on first error if that's the consensus, and I could take some tedious 
record-keeping out. I think there's no big problem with continuing on, since 
the state of committed documents is indeterminate already when errors occur so 
worrying about this should be part of a bigger issue.

> XmlUpdateRequestHandler bad documents mid batch aborts rest of batch
> --------------------------------------------------------------------
>
>                 Key: SOLR-445
>                 URL: https://issues.apache.org/jira/browse/SOLR-445
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 1.3
>            Reporter: Will Johnson
>            Assignee: Erick Erickson
>             Fix For: Next
>
>         Attachments: SOLR-445-3_x.patch, SOLR-445.patch, SOLR-445.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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to