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


##########
lucene/core/src/java/org/apache/lucene/index/FieldInfos.java:
##########
@@ -403,11 +385,8 @@ static final class FieldNumbers {
     FieldNumbers(String softDeletesFieldName, String parentFieldName) {
       this.nameToNumber = new HashMap<>();
       this.numberToName = new IntObjectHashMap<>();
-      this.indexOptions = new HashMap<>();
-      this.docValuesType = new HashMap<>();
-      this.dimensions = new HashMap<>();
-      this.vectorProps = new HashMap<>();
       this.omitNorms = new HashMap<>();
+      this.fieldProperties = new HashMap<>();

Review Comment:
   Yes, it looks like we can add all immutable attributes there indeed.



##########
lucene/core/src/java/org/apache/lucene/index/FieldInfos.java:
##########
@@ -701,9 +684,7 @@ synchronized Set<String> getFieldNames() {
     synchronized void clear() {
       numberToName.clear();
       nameToNumber.clear();
-      indexOptions.clear();
-      docValuesType.clear();
-      dimensions.clear();
+      fieldProperties.clear();

Review Comment:
   This is a bug indeed. So if you call deleteAll, then you won't be able to 
index vectors with different options. I don't think it's a common use-case, 
which is likely why it's never been reported.



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