Understanding the different type of SOLR commits

五迷三道 提交于 2019-12-06 08:01:06

问题


I want to clarify my understanding about different type of Solr commits. Please correct me if I am wrong.

  • commits: all type of commits including SOFT and HARD commits.

  • autoCommit: does a HARD commit to the disk and make sure all the autoSoftCommit commits are written to disk and commits any other pending documents.

  • autoSoftCommit - does a SOFT commit . After a autoSoftCommit, if the the SOLR server goes down, the autoSoftCommit documents will be lost.
  • autocommit maxTime: Maximum time between two autocommits execution (in my case it is set as 15000s)
  • soft autocommit maxTime:Maximum documents ‘adds’ between two SOFT auto-commits. (in my case it is set as 180000s)

So, if we set commit=true parameter to any solr api call with some document data, then it does HARD commit to current document also to the pending documents. doc will updated on the disk within (15000ms=15secs)

So, if we set commit=false parameter to any solr api call with some document data, then it does SOFT commit to current document also to the pending documents. doc will updated on the disk within (180000ms=3mins)

Solr Stats url : https://cwiki.apache.org/confluence/display/solr/Performance+Statistics+Reference

Is it possible to give an example for commit, autoCommit and softCommit


回答1:


I recommend this Old but Gold article[1] and this recent mail thread[2]. Also your distinction in how you can trigger Hard and Soft commit is not quite right [3]

[1] https://lucidworks.com/2013/08/23/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/

[2] http://lucene.472066.n3.nabble.com/High-disk-write-usage-td4344356.html#a4345233

[3] https://cwiki.apache.org/confluence/display/solr/UpdateHandlers+in+SolrConfig#UpdateHandlersinSolrConfig-commitandsoftCommit



来源:https://stackoverflow.com/questions/45234145/understanding-the-different-type-of-solr-commits

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!