s1monw commented on a change in pull request #1617:
URL: https://github.com/apache/lucene-solr/pull/1617#discussion_r446380003
##########
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:
👍
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]