You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by S G <sg...@gmail.com> on 2016/12/17 22:05:17 UTC
How to identify documents failed in a batch request?
Hi,
I am using the following code to send documents to Solr:
final UpdateRequest request = new UpdateRequest();
request.setAction(UpdateRequest.ACTION.COMMIT, false, false);
request.add(docsList);
UpdateResponse response = request.process(solrClient);
The response returned from the last line does not seem to be very helpful
in determining how I can identify documents failed in a batch request.
Does anyone know how this can be done?
Thanks
SG
Re: How to identify documents failed in a batch request?
Posted by David Smiley <da...@gmail.com>.
If you enable the "TolerantUpdateProcessor" Solr-side, you can add
documents in bulk allowing some to fail and know which did:
http://www.solr-start.com/javadoc/solr-lucene/org/apache/solr/update/processor/TolerantUpdateProcessorFactory.html
On Sat, Dec 17, 2016 at 5:05 PM S G <sg...@gmail.com> wrote:
> Hi,
>
> I am using the following code to send documents to Solr:
>
> final UpdateRequest request = new UpdateRequest();
> request.setAction(UpdateRequest.ACTION.COMMIT, false, false);
> request.add(docsList);
> UpdateResponse response = request.process(solrClient);
>
> The response returned from the last line does not seem to be very helpful
> in determining how I can identify documents failed in a batch request.
>
> Does anyone know how this can be done?
>
> Thanks
> SG
>
--
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com