mirror of https://github.com/apache/lucene.git
Disable KNN format randomization in some KNN block join tests
This commit is contained in:
parent
6b0112cdee
commit
4f8035c013
|
@ -50,6 +50,7 @@ import org.apache.lucene.search.Weight;
|
|||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.tests.index.RandomIndexWriter;
|
||||
import org.apache.lucene.tests.util.LuceneTestCase;
|
||||
import org.apache.lucene.tests.util.TestUtil;
|
||||
|
||||
abstract class ParentBlockJoinKnnVectorQueryTestCase extends LuceneTestCase {
|
||||
|
||||
|
@ -185,7 +186,10 @@ abstract class ParentBlockJoinKnnVectorQueryTestCase extends LuceneTestCase {
|
|||
try (Directory d = newDirectory()) {
|
||||
try (IndexWriter w =
|
||||
new IndexWriter(
|
||||
d, newIndexWriterConfig().setMergePolicy(newMergePolicy(random(), false)))) {
|
||||
d,
|
||||
newIndexWriterConfig()
|
||||
.setCodec(TestUtil.getDefaultCodec())
|
||||
.setMergePolicy(newMergePolicy(random(), false)))) {
|
||||
List<Document> toAdd = new ArrayList<>();
|
||||
for (int j = 1; j <= 5; j++) {
|
||||
Document doc = new Document();
|
||||
|
@ -240,7 +244,8 @@ abstract class ParentBlockJoinKnnVectorQueryTestCase extends LuceneTestCase {
|
|||
* randomly fail to find one).
|
||||
*/
|
||||
try (Directory d = newDirectory()) {
|
||||
try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig())) {
|
||||
try (IndexWriter w =
|
||||
new IndexWriter(d, new IndexWriterConfig().setCodec(TestUtil.getDefaultCodec()))) {
|
||||
int r = 0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int j = 0; j < 5; j++) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.lucene.search.IndexSearcher;
|
|||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.tests.util.TestUtil;
|
||||
|
||||
public class TestParentBlockJoinFloatKnnVectorQuery extends ParentBlockJoinKnnVectorQueryTestCase {
|
||||
|
||||
|
@ -76,7 +77,10 @@ public class TestParentBlockJoinFloatKnnVectorQuery extends ParentBlockJoinKnnVe
|
|||
try (Directory d = newDirectory()) {
|
||||
try (IndexWriter w =
|
||||
new IndexWriter(
|
||||
d, new IndexWriterConfig().setMergePolicy(newMergePolicy(random(), false)))) {
|
||||
d,
|
||||
new IndexWriterConfig()
|
||||
.setCodec(TestUtil.getDefaultCodec())
|
||||
.setMergePolicy(newMergePolicy(random(), false)))) {
|
||||
for (int j = 1; j <= 5; j++) {
|
||||
List<Document> toAdd = new ArrayList<>();
|
||||
Document doc = new Document();
|
||||
|
|
Loading…
Reference in New Issue