0
votes

When I configure Solr 4.10.4 with "openSearcher=false" for autoCommit and autoSoftCommit disabled, updates to a dynamicField (indexed="false" stored="true") never become visible in query results, even after issuing an explicit commit.

In Solr 3.6 I somtimes experience the same behavior, which is a bit surprising since I thought Solr 3.6 always had "openSearcher=true" on commit.

Why is this? And how do I fix it? Is there any way to reopen the searchers?

For both Solr 4 and Solr 3.6, the updates become visible after restarting Solr.

In Solr 4, configuring autoCommit with "openSearcher=true" also resolves the problem, as does enabling autoSoftCommit.

1

1 Answers

1
votes

From the Solr documentation:

openSearcher

Whether to open a new searcher when performing a commit. If this is false, the default, the commit will flush recent index changes to stable storage, but does not cause a new searcher to be opened to make those changes visible

It's working as it shoud. If openSearcher is false then the commits become visible once a new searcher is opened, which is at the start of the server. New searchers do not get created while the service is running. The commits get flushed to disk but the existing searcher is not aware of them.

Soft commit setting on the other hand is about how fast the committed results become visible for the new searchers. Hard commits take time because there is disk based activity where new entries are merged with the existing index, after which before they become available for search once the search index is in sync and a new searcher is started. Soft commit updates the search index first, so searches work soon after, but the full commit state is only later achieved once data on disk is in sync with the index. It's a trade off to see the new data faster.