Solr: how to set hard commit, soft commit and openSearcher
https://lucidworks.com/blog/2013/08/23/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/
A hard commit is to write the data to disk and rotate the transaction log. You can optionally open a new searcher after a hard commit. Open a new searcher after a hard commit is slow.
A soft commit will always open a new searcher, but the cost is much less than a hard commit. A soft commit will not rotate the transaction log. In case of a server crash, if the transaction log is large, a long recovery time is needed when restart the server.
In a near-realtime environment, set autoSoftCommit as long as you can tolerate. Hard commits with openSearcher set to false, as soft commit will open new searcher. The period for hard commit should be determined by the indexing load. The heavier the indexing of new docs, the shorter the period for autoCommit.
沒有留言:
發佈留言