Configuring the update handler and autoSoftCommit

To configure the update handler, set the default high-performance update handler flag.

You need to configure the solrconfig.xml to use near real-time capabilities in Solr by setting the default high-performance update handler flag.

For example, the Solr configuration file for the Wikipedia demo sets this flag as follows and uncomments the autoSoftCommit element:
<!-- The default high-performance update handler -->
 <updateHandler class="solr.DirectUpdateHandler2">

 . . .


The autoCommit element is removed to prevent hard commits that hit the disk and flush the cache. The soft commit forces uncommitted documents into internal memory. When data is committed, it is immediately available after the commit.

For live indexing only, the autoSoftCommit/maxTime saturates at 3000 ms, any higher value is overridden to limit the maximum time to 3000ms. Live indexing is on when <rt>true</rt> is in solrconfig.xml. See Configuring and tuning indexing performance.

The autoSoftCommit element uses the maxTime update handler attribute. The update handler attributes enable near real-time performance and trigger a soft commit of data automatically, so checking synchronization of data to disk is not necessary. This table describes both update handler options.

Attribute Default Description
maxDocs No default Maximum number of documents to add since the last soft commit before automatically triggering a new soft commit.
maxTime 3000 Maximum expired time in milliseconds between the addition of a document and a new, automatically triggered soft commit.

For more information about the update handler and modifying solrconfig.xml, see the Solr documentation.

Configuring update performance

If updates take too long and the value of autoSoftCommit is higher than the default (1000ms), reset autoSoftCommit to the default value. This setting is in solrconfig.xml.