Fix test failure TestParentBlockJoinFloatKnnVectorQuery.testSkewedIndex (#13082)

This commit is contained in:
Benjamin Trent 2024-02-07 12:55:43 -05:00 committed by Benjamin Trent
parent d9accfd409
commit 4bbefda4f2
1 changed files with 2 additions and 3 deletions

View File

@ -29,6 +29,7 @@ import org.apache.lucene.document.StringField;
import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.Term; import org.apache.lucene.index.Term;
import org.apache.lucene.index.VectorSimilarityFunction; import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.DocIdSetIterator;
@ -233,9 +234,7 @@ abstract class ParentBlockJoinKnnVectorQueryTestCase extends LuceneTestCase {
* randomly fail to find one). * randomly fail to find one).
*/ */
try (Directory d = newDirectory()) { try (Directory d = newDirectory()) {
try (IndexWriter w = try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig())) {
new IndexWriter(
d, newIndexWriterConfig().setMergePolicy(newMergePolicy(random(), false)))) {
int r = 0; int r = 0;
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) { for (int j = 0; j < 5; j++) {