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">

 . . .

  <autoSoftCommit>
    <maxTime>1000</maxTime>
  </autoSoftCommit>
</updateHandler>

The autoCommit element has been 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, is it immediately available after the commit.

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 1000 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 you changed the default autoSoftCommit from the default 1000 ms to a higher value, reset autoSoftCommit in the solrconfig.xml to its default value.