Re: Handling failure when adding docs to Solr using SolrJ

2020-09-17 Thread Erick Erickson
I recommend _against_ issuing explicit commits from the client, let your solrconfig.xml autocommit settings take care of it. Make sure either your soft or hard commits open a new searcher for the docs to be searchable. I’ll bend a little bit if you can _guarantee_ that you only ever have one index

Handling failure when adding docs to Solr using SolrJ

2020-09-17 Thread Steven White
Hi everyone, I'm trying to figure out when and how I should handle failures that may occur during indexing. In the sample code below, look at my comment and let me know what state my index is in when things fail: SolrClient solrClient = new HttpSolrClient.Builder(url).build(); solrClient.