You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by lakshmi_ram20 <la...@yahoo.com> on 2019/01/05 20:35:29 UTC

Adding documents through Solr Client

Guys - I need help on exception handling while adding documents.

I am adding collection of documents - several millions with a batch of
2000-3000 documents through parallel threads -   through SolrJ.add (
Collection ) API  and storing the response in UpdateResponse object.
I was using response.getStatus to check for failure and capture the errors. 
 
#1) But the exception handling behavior is not what I expected it to be.
When one of the document has an error , System is directly throwing
exception. The code with response object.getStatus is never reached in case
of errors making "if getStatus <> 0 " unreachable.

#2) Also, if I am using collection of Solr documents and only few of the
documents has error , is it possible to get the document ids that has the
error than saying entire batch has some error.I want my users to have the
ability to correct those documents and re-submit..Right now , the only way
is to show entire 2000 documents have failed with an incorrect error message
that is only applicable to say 10-20 records.

Any guidance on exception handling while adding collection of documents is
appreciated. 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html