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>

For live indexing only, the AutoSoftCommit/maxTime saturates at 1000 ms, any higher value is overridden to limit the maximum time to 1000ms. Live indexing is on when <rt>true</rt> is in solrconfig.xml. Enable live indexing on only one Solr core per cluster.

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.

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. With live indexing, use the default 1000.

See the Solr documentation for information about the update handler and modifying solrconfig.xml.

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 in the solrconfig.xml file.

Note: A higher value for autoSoftCommit, such as 10000, is suitable when live indexing is not enabled. DataStax recommends using the default value when live indexing is enabled.