Why set a delay for apache solr indexing?
Solution 1:
It's waiting for more content.
When Solr runs a commit operation to bring more documents into the index, it needs to tear down its existing searcher core and start up a new one. This is a resource intensive operation, and destroys all of the old searcher's caches (and re-runs its cache warming process). If you're doing your updates in a number of different requests, it's less than ideal to spin a new searcher (potentially dozens of times in a few seconds, depending on how you're doing your document additions), slowing down the document updates and trashing the performance of any search queries that come in during that time.
The <autoCommit>
settings in your solrconfig.xml
govern the delay, or you can override it completely and commit instantly by adding ?commit=true
to the URL of your HTTP POST
to the /update
URL.