On 6/16/22 09:16, Christopher Schultz wrote:
We have our server set to soft-commit every 30 seconds.
30 seconds is very aggressive. It's far better than 1 second, but still
quite frequent.
If we know we are going to be sending a lot of documents at once, if
we set "commitWithin" to something longer -- for those
document-add/replace requests, will that override the soft-commit
setting, or will the soft-commit setting just go-ahead and soft-commit
regardless?
All timers for committing are honored. If you index some documents with
autoSoftCommit at 30 seconds and commitWithin at 60 seconds, then the
autoSoftCommit will fire 30 seconds after indexing begins, and
commitWithin will fire 60 seconds after indexing begins. If no changes
take place between 30 and 60 seconds, then the commitWithin will be a no-op.
1. Disable global soft-commit
2. Change our "document-add" operations to always specify
commitWithin=30s
If the indexing requests ALWAYS have commitWithin (or even commit=true)
then autoSoftCommit is superfluous.
I think what I would do is set autoSoftCommit at two to five minutes to
catch any updates that manage to happen without a commit option, and
make sure that all updates specify something for commit. In that setup,
autoSoftCommit will probably always be a no-op.
As I said ... 30 seconds is very aggressive, unless the index size is
very small. If the index has any heft, consider a larger interval.
FYI, commitWithin is typically executed as a soft commit.
Thanks,
Shawn