You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ju...@apache.org on 2021/08/16 16:11:47 UTC

[lucene] branch main updated: LUCENE-9614: Prevent TestKnnVectorQuery from using simple text codec (#244)

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

julietibs 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 e48be68  LUCENE-9614: Prevent TestKnnVectorQuery from using simple text codec (#244)
e48be68 is described below

commit e48be684b227dd483cc8e6e1a90535dc729f6473
Author: Julie Tibshirani <ju...@gmail.com>
AuthorDate: Mon Aug 16 19:11:03 2021 +0300

    LUCENE-9614: Prevent TestKnnVectorQuery from using simple text codec (#244)
    
    The simple text codec doesn't support kNN searches, so the test will fail when
    we randomly chose to use it.
---
 lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java
index 6443c86..a942003 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java
@@ -35,8 +35,10 @@ import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 
 /** TestKnnVectorQuery tests KnnVectorQuery. */
+@SuppressCodecs("SimpleText") // The codec must support kNN searches
 public class TestKnnVectorQuery extends LuceneTestCase {
 
   public void testEquals() {