Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apache Solr is configured by default to have a certain delay (in my case 2 minutes) before indexing content. I've seen in other posts how to reduce this, but I'm having trouble understanding why you would want a delay in the first place? What would be the downsides of reducing the delay to 0?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.