uchiha-asha commented on code in PR #16864:
URL: https://github.com/apache/lucene/pull/16864#discussion_r4692907472


##########
lucene/core/src/java/org/apache/lucene/index/FieldInfo.java:
##########
@@ -597,6 +597,28 @@ public DocValuesSkipIndexType docValuesSkipIndexType() {
     return docValuesSkipIndex;
   }
 
+  /** Returns true if every property of this field, including its attributes, 
equals {@code o}'s. */
+  boolean hasSameState(FieldInfo o) {

Review Comment:
   I think reader-owned `FieldInfos` are intended to be read-only. `FieldInfos` 
computes `hasDocValues` at construction, so calling  `setDocValuesType` on a 
`FieldInfo` will leave its enclosing `FieldInfos` stale. Also, two readers can 
already share `core.coreFieldInfos` after a hard-delete-only reopen 
(`SegmentReader#initFieldInfos`).



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