msokolov commented on code in PR #13135:
URL: https://github.com/apache/lucene/pull/13135#discussion_r1528450684


##########
lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseFieldInfoFormatTestCase.java:
##########
@@ -278,46 +278,50 @@ public void testRandom() throws Exception {
 
     String parentField = random().nextBoolean() ? 
TestUtil.randomUnicodeString(random()) : null;
 
-    var builder = INDEX_PACKAGE_ACCESS.newFieldInfosBuilder(softDeletesField, 
parentField);
-
-    for (String field : fieldNames) {
-      IndexableFieldType fieldType = randomFieldType(random(), field);
-      boolean storeTermVectors = false;
-      boolean storePayloads = false;
-      boolean omitNorms = false;
-      if (fieldType.indexOptions() != IndexOptions.NONE) {
-        storeTermVectors = fieldType.storeTermVectors();
-        omitNorms = fieldType.omitNorms();
-        if 
(fieldType.indexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) 
>= 0) {
-          storePayloads = random().nextBoolean();
+    if (softDeletesField == null

Review Comment:
   this seems like somewhat complex logic here to handle a problem we created ( 
parentField name the same as softDeletesField name - empty?) Would it be 
cleaner to add a loop generating a parentFieldName that is unique (or null)? Or 
maybe, if parentFIeld = softDeletesField, set it to null instead?
   
   Or - am I missing something here - did you fix some other potential edge 
cases too? 



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