Thanks Shalin for the reply.
I am working with the remote Solr server. I am using autocommit instead
of commit method call because I observed significant performance
improvement with autocommit. 
Just wanted to make sure that callback functionality is currently not
available in Solr.

Thanks,
Siddharth 

-----Original Message-----
From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] 
Sent: Friday, January 09, 2009 3:16 PM
To: solr-user@lucene.apache.org
Subject: Re: Ensuring documents indexed by autocommit

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