mikemccand commented on a change in pull request #1617: URL: https://github.com/apache/lucene-solr/pull/1617#discussion_r446349990
########## File path: lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java ########## @@ -459,6 +463,27 @@ public IndexWriterConfig setCommitOnClose(boolean commitOnClose) { return this; } + /** + * Expert: sets the amount of time to wait for merges returned by MergePolicy.findFullFlushMerges(...). + * If this time is reached, we proceed with the commit based on segments merged up to that point. + * The merges are not cancelled, and will still run to completion independent of the commit + * like normal segment merges. The default is <code>{@value IndexWriterConfig#DEFAULT_MAX_COMMIT_MERGE_WAIT_MILLIS}</code>. + * + * Note: This settings has no effect unless {@link MergePolicy#findFullFlushMerges(MergeTrigger, SegmentInfos, MergePolicy.MergeContext)} + * has an implementation that actually returns merges which by default doesn't return any merges. + */ + public IndexWriterConfig setMaxCommitMergeWaitMillis(long maxCommitMergeWaitMillis) { + this.maxCommitMergeWaitMillis = maxCommitMergeWaitMillis; + return this; + } + + /** We only allow sorting on these types */ + private static final EnumSet<SortField.Type> ALLOWED_INDEX_SORT_TYPES = EnumSet.of(SortField.Type.STRING, Review comment: OK I see this was removed earlier in mainline for LUCENE-9330 -- it must've snuck back in as a merge conflict. I'll re-remove now. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org