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


##########
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:
   Your understanding is right, we are only fixing the edge case when both are 
empty and obviously not null.
   
   > 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?
   
   That seems fair to me, it'll be cleaner if we set one to null



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