Hi, Thats correct. For failure, you have to check for the text *"Indexing failed. Rolled back changes"* under the <lst name="statusMessages"> tag. One more thing to note here is that there may be a time during the indexing process where the indexing is complete but the index is not committed and optimized yet. You would need to check if the response listed below is present along with the success message to term it as a complete success.
*<str name="Committed">2012-05-31 15:10:45</str> <str name="Optimized">2012-05-31 15:10:45</str>* On Thu, May 31, 2012 at 3:42 PM, geeky2 <gee...@hotmail.com> wrote: > hello all, > > i have been asked to write a small polling script (bash) to periodically > check the status of an import on our Master. our import times are small, > but there are business reasons why we want to know the status of an import > after a specified amount of time. > > i need to perform certain actions based on the "status" of the import, and > therefore need to quantify which tags to check and their appropriate > states. > > i am using the command from the DataImportHandler HTTP API to get the > status > of the import: > > OUTPUT=$(curl -v > http://${SERVER}:${PORT}/somecore/dataimport?command=status) > > > > > can someone tell me if i have these rules correct? > > 1) during an import - the status tag will have a busy state: > > example: > > <str name="status">busy</str> > > 2) at the completion of an import (regardless of failure or success) the > status tag will have an "idle" state: > > example: > > <str name="status">idle</str> > > > 3) to determine if an import failed or succeeded - you must interrogate the > tags under <lst name="statusMessages"> and specifically look for : > > success: > <str name="">Indexing completed. Added/Updated: 603378 documents. Deleted 0 > documents.</str> > > failure: > <str name="">Indexing completed. Added/Updated: 603378 documents. Deleted 0 > documents.</str> > > thank you, > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/possible-status-codes-from-solr-during-a-DIH-data-import-process-tp3987110.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Thanks and Regards Rahul A. Warawdekar