vigyasharma commented on a change in pull request #633:
URL: https://github.com/apache/lucene/pull/633#discussion_r830568703



##########
File path: lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
##########
@@ -567,6 +605,21 @@ public abstract MergeSpecification findMerges(
       MergeTrigger mergeTrigger, SegmentInfos segmentInfos, MergeContext 
mergeContext)
       throws IOException;
 
+  /**
+   * Define {@link OneMerge} operations for a list of codec readers. This call 
is used to
+   * define merges for input readers in {@link 
IndexWriter#addIndexes(CodecReader...)}.
+   * Default implementation adds all readers to a single merge. This can be 
overridden in custom
+   * merge policies.
+   *
+   * @param readers set of readers to merge into the main index
+   */
+  public MergeSpecification findMerges(List<CodecReader> readers) throws 
IOException {
+    OneMerge merge = new OneMerge(readers, leaf -> new MergeReader(leaf, 
leaf.getLiveDocs()));

Review comment:
       Create https://issues.apache.org/jira/browse/LUCENE-10476 for the follow 
up task.




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

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

Reply via email to