diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java index dcd1dbea4a6..2fb91ce7bf7 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java @@ -17,6 +17,7 @@ package org.apache.lucene.index; * limitations under the License. */ +import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -174,9 +175,7 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase { continue; } - boolean fieldHasPayloads = random().nextBoolean(); - - fieldInfoArray[fieldUpto] = new FieldInfo(field, true, fieldUpto, false, false, fieldHasPayloads, + fieldInfoArray[fieldUpto] = new FieldInfo(field, true, fieldUpto, false, false, true, IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, null, DocValues.Type.FIXED_INTS_8, null); fieldUpto++; @@ -185,9 +184,7 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase { fields.put(field, postings); Set seenTerms = new HashSet(); - // TODO - //final int numTerms = atLeast(10); - final int numTerms = 4; + final int numTerms = atLeast(10); for(int termUpto=0;termUpto= 0 && allowPayloads; newFieldInfoArray[fieldUpto] = new FieldInfo(oldFieldInfo.name, @@ -501,7 +497,8 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase { // Maximum options (docs/freqs/positions/offsets) to test: IndexOptions maxIndexOptions, - EnumSet