Data written to LindormSearch becomes searchable only after it is committed. LindormSearch supports two commit types that work together to balance query visibility and data durability:
Soft commit — makes indexed data visible to queries without flushing to disk. Faster than a hard commit.
Hard commit — flushes index data to disk. Slower, but ensures data durability.
Soft commit controls query visibility (the "near" in near-real-time search). Hard commit controls data durability. Both must be enabled.
Configure solrconfig.xml
The solrconfig.xml file in your index's configuration set controls automatic commit behavior. To get this file, see Update the configuration set.
The following is the recommended configuration for both commit types:
<autoSoftCommit>
<maxTime>${solr.autoSoftCommit.maxTime:15000}</maxTime>
</autoSoftCommit>
<autoCommit>
<maxTime>${solr.autoCommit.maxTime:30000}</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>| Parameter | Default | Behavior |
|---|---|---|
autoSoftCommit > maxTime | 15000 ms (15 s) | Data becomes visible to queries within this interval after being written |
autoCommit > maxTime | 30000 ms (30 s) | Data is flushed to disk within this interval |
openSearcher | false | Hard commit does not open a new searcher; soft commit handles visibility |
Keep bothmaxTimevalues high enough for your workload. The defaults (15 s / 30 s) are a safe starting point. SettingautoCommittoo low causes LindormSearch to flush data to disk frequently, degrading write performance.
Apply configuration changes
Download the configuration set. See Update the configuration set.
Edit the
autoSoftCommitandautoCommitvalues insolrconfig.xml.Upload the updated configuration set:
./solr zk upconfig -d conf/ -n myconfReload Collection.

Control visibility from the client
Instead of relying on automatic commits, trigger commits explicitly when writing individual documents for per-write control over visibility timing.
commitWithinMs
Pass a commitWithinMs value when adding a document to request that the server commits within the specified interval:
// Make the document available for queries within 1,000 ms after it is added.
public UpdateResponse add(SolrInputDocument doc, int commitWithinMs)
throws SolrServerException, IOException;
cloudSolrClient.add(doc, 1000);commit API
Call commit() explicitly after writing to control exactly when the server commits:
// Trigger an immediate soft commit to make the document visible for queries.
// Parameters: waitFlush=false, waitSearcher=false, softCommit=true
public UpdateResponse commit(boolean waitFlush, boolean waitSearcher, boolean softCommit)
throws SolrServerException, IOException;
cloudSolrClient.commit(false, false, true);