3

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

enter image description here

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

A l w a y s S u n n y
  • 36,497
  • 8
  • 60
  • 103

1 Answers1

2

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

  • many many thanks for your reference link related to solr commits :). Actually, Now I need to know from you what actually happens when we set `commit=true` or `commit=false` with url ? is it hard commit or soft commit ? what is the default value of `commit` param? – A l w a y s S u n n y Jul 25 '17 at 06:30
  • 1
    Have you read [3] ? If you set commit=true you ask for an Hard Commit. If you don't set it ( or you set it false) you don't ask for a commit at all. – Alessandro Benedetti Jul 25 '17 at 08:53