You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/03/20 06:53:12 UTC

[GitHub] [lucene] vigyasharma commented on a change in pull request #633: LUCENE-10216: Use MergeScheduler and MergePolicy to run addIndexes(CodecReader[]) merges.

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



##########
File path: lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
##########
@@ -813,12 +866,24 @@ protected final boolean verbose(MergeContext mergeContext) {
   }
 
   static final class MergeReader {
+    final CodecReader codecReader;
     final SegmentReader reader;

Review comment:
       I looked into this more, and I'm not able to get rid of either of them in the current structure. SegmentReader seems to hold important information about segments that is required by consumers in different places, like the regular segment merges, so I can't always just use CodecReader in OneMerge objects.
   
   AddIndexes() can only work with CodecReaders, as there are no segments to begin with (which means I can also not create a segment reader from the provided codec readers here).
   
   Maybe, I can extend `OneMerge` to create a `ReaderOneMerge` class that only works with CodecReaders? Would love to hear your thoughts, or any other better ideas..




-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org