On 11/19/2012 11:52 AM, Dyer, James wrote:
Andy,

I use an approach similar to yours.  There may be something better, however.  You might 
be able to write an "onImportEnd" listener to tell you when it ends.

See http://wiki.apache.org/solr/DataImportHandler#EventListeners for a little 
documentation

See also https://issues.apache.org/jira/browse/SOLR-938 and 
https://issues.apache.org/jira/browse/SOLR-1081 for the background on this 
feature.

If you do end up using this let us know how it works and if there is anything 
you could see to improve it.

I think it would be a good idea to provide a SolrJ API out of the box (similar to CoreAdminRequest) for gathering the status URL from Solr and obtaining the following information:

1) Determining import status
-a) never started (idle)
-b) finished successful (idle)
-c) finished with error, canceled, etc. (idle)
-d) in progress. (busy)
2) Determining how many documents have been added.
3) Determining how long the import took or has taken so far.
4) Any other commonly gathered information.

There may be some reluctance to do this simply because DIH is a contrib module. Perhaps there could be a contrib module for SolrJ?

Thanks,
Shawn

Reply via email to