First off, you can see the expression ${solr.autoSoftCommit.maxTime:-1} within the tag. This allows you to make use of Solr’s variable substitution. That feature is described in detail here in the reference. If that variable has not been substituted by any of those means -1 is taken as value for that configuration.

Turning commitMaxTime to -1 effectively turns autocommit off. If you have a look at the relevant code below, you can see that commitMaxTime overrules any value of maxDocs, as the scheduleCommitWithin method returns immediately. I have not found this behaviour documented, so I looked up the code.

Advertisements