On Fri, Jan 9, 2009 at 3:03 PM, Gargate, Siddharth <sgarg...@ptc.com> wrote:

> Hi all,
>    I am using CommonsHttpSolrServer to add documents to Solr. Instead
> of explicitly calling commit for every document I have configured
> autocommit in solrconfig.xml. But how do we ensure that the document
> added is successfully indexed/committed on Solr side. Is there any
> callback mechanism available where the callback method my application
> will get called? I looked at the postCommit listener in solrconfig.xml
> file but looks like it just supports execution of external executables.
>

Are you using embedded Solr? or is it on a remote machine? A callback would
only work on the same JVM anyway.

You can always call commit through CommonsHttpSolrServer and then do a query
to check if the document you expect got indexed. Though, if all the add and
commit calls were successful (i.e. returned HTTP 200), it is very unlikely
that the document won't be indexed.

-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to