You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2023/11/23 12:38:14 UTC

(lucene) branch main updated: Fix test to preserve index order.

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 14cee15c08b Fix test to preserve index order.
14cee15c08b is described below

commit 14cee15c08b4ef147042cb13030e49514323e47a
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Thu Nov 23 13:37:31 2023 +0100

    Fix test to preserve index order.
---
 .../org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
index d85e788c8d2..8f5f8a84eb1 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseKnnVectorsFormatTestCase.java
@@ -818,7 +818,8 @@ public abstract class BaseKnnVectorsFormatTestCase extends BaseIndexFileFormatTe
 
   public void testIndexMultipleKnnVectorFields() throws Exception {
     try (Directory dir = newDirectory();
-        IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig())) {
+        IndexWriter iw =
+            new IndexWriter(dir, newIndexWriterConfig().setMergePolicy(newLogMergePolicy()))) {
       Document doc = new Document();
       float[] v = new float[] {1};
       doc.add(new KnnFloatVectorField("field1", v, VectorSimilarityFunction.EUCLIDEAN));