jpountz commented on code in PR #13208:
URL: https://github.com/apache/lucene/pull/13208#discussion_r1537788640


##########
lucene/core/src/java/org/apache/lucene/index/MergeState.java:
##########
@@ -266,4 +266,35 @@ static PackedLongValues removeDeletes(final int maxDoc, 
final Bits liveDocs) {
     }
     return docMapBuilder.build();
   }
+
+  /**
+   * Creates a new state from an existing state with new fieldInfos and 
FieldsProducer.
+   *
+   * @param state the state to be copied
+   * @param mergeFieldInfos the new field infos of the merged segment
+   * @param fieldInfos the new field infos
+   * @param fieldsProducers the new field producers
+   */
+  public MergeState(

Review Comment:
   I had something different in mind but I realize it wouldn't work without 
re-computing merge instances over and over again, which we probably don't want. 
Your approach looks better.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to