On 10/7/2020 4:40 PM, yaswanth kumar wrote:
I have the below in my solrconfig.xml
<updateHandler class="solr.DirectUpdateHandler2">
<updateLog>
<str name="dir">${solr.Data.dir:}</str>
</updateLog>
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:60000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>${solr.autoSoftCommit.maxTime:5000}</maxTime>
</autoSoftCommit>
</updateHandler>
Does this mean even though we are always sending data with commit=false on
update solr api, the above should do the commit every minute (60000 ms)
right?
Assuming that you have not defined the "solr.autoCommit.maxTime" and/or
"solr.autoSoftCommit.maxTime" properties, this config has autoCommit set
to 60 seconds without opening a searcher, and autoSoftCommit set to 5
seconds.
So five seconds after any indexing begins, Solr will do a soft commit.
When that commit finishes, changes to the index will be visible to
queries. One minute after any indexing begins, Solr will do a hard
commit, which guarantees that data is written to disk, but it will NOT
open a new searcher, which means that when the hard commit happens, any
pending changes to the index will not be visible.
It's not "every five seconds" or "every 60 seconds" ... When any changes
are made, Solr starts a timer. When the timer expires, the commit is
fired. If no changes are made, no commits happen, because the timer
isn't started.
Thanks,
Shawn