: Thanks again for your inputs. : But then I am still stuck on the question that how do we ensure that : document is successfully indexed. One option I see is search for every
Have faith. If the add completes successfully then the data made it to solr, was indexed, and now lives in the index files. If the commit completes sucessfully then the index files have been flushed and checkpointed so all new uses of them will seethe data. If you want to be sure your data is indexed, all you have to do is check that neither of those calls got an error (hence Shalin's point about doing the commit yourself instead of using autocommit so you can actually test the response from the commit call. But frankly, i wouldn't worry so much. (How do you ensure that rows are successfully stored when you do database updates?) -Hoss