Disable byte encoding in TestSimpleTextKnnVectorsFormat

This commit is contained in:
Julie Tibshirani 2022-08-21 17:00:57 -07:00
parent 653d2ebf71
commit df67223497
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import org.apache.lucene.codecs.Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.KnnVectorField;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.VectorEncoding;
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.BaseKnnVectorsFormatTestCase;
@ -30,6 +31,12 @@ public class TestSimpleTextKnnVectorsFormat extends BaseKnnVectorsFormatTestCase
return new SimpleTextCodec();
}
@Override
protected VectorEncoding randomVectorEncoding() {
// TODO: Should SimpleTextKnnVectorsFormat support all encodings?
return VectorEncoding.FLOAT32;
}
public void testUnsupportedEncoding() throws Exception {
try (Directory dir = newDirectory();
IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig())) {