You could instantiate an anonymous instance of StreamingUpdateSolrServer that has a "handleError" method that then parses the exception message to get the request URI. If there isn't enough information there, you could add a dummy request option to your original request that was a document identifier of your own.

Pseudo code:

   StreamingUpdateSolrServer myServer = new StreamingUpdateSolrServer(...){
     void handleError( Throwable ex ){
       super.handleError(ex);
       // extract text from ex.getMessage()
     }
   };

Included in the message text is "request: " followed by the URI for the HTTP method, which presumably has the request options (unless they were encoded in the body of the request as multipart form data.)

-- Jack Krupansky

-----Original Message----- From: Kissue Kissue
Sent: Sunday, June 17, 2012 7:40 AM
To: solr-user@lucene.apache.org
Subject: StreamingUpdateSolrServer - Failure during indexing

Hi,

Using the StreamingUpdateSolrServer, does anybody know how i can get the
list of documents that failed during indexing so maybe i can index them
later? Is it possible? I am using Solr 3.5 with SolrJ.

Thanks.

Reply via email to