From ca5e483e1e70abdc19196e1018b3a7fd06908bf6 Mon Sep 17 00:00:00 2001 From: Ryan Bogan <10944539+ryanbogan@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:37:56 -0700 Subject: [PATCH] Change imports to align with core lucene upgrade (#1147) Signed-off-by: Ryan Bogan --- .../org/opensearch/knn/index/mapper/LuceneFieldMapper.java | 4 ++-- src/main/java/org/opensearch/knn/index/util/KNNEngine.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/opensearch/knn/index/mapper/LuceneFieldMapper.java b/src/main/java/org/opensearch/knn/index/mapper/LuceneFieldMapper.java index 94e42ee7c..b28b93028 100644 --- a/src/main/java/org/opensearch/knn/index/mapper/LuceneFieldMapper.java +++ b/src/main/java/org/opensearch/knn/index/mapper/LuceneFieldMapper.java @@ -23,7 +23,7 @@ import java.util.Locale; import java.util.Optional; -import static org.apache.lucene.index.VectorValues.MAX_DIMENSIONS; +import org.apache.lucene.codecs.KnnVectorsFormat; import static org.opensearch.knn.common.KNNConstants.VECTOR_DATA_TYPE_FIELD; import static org.opensearch.knn.index.mapper.KNNVectorFieldMapperUtil.addStoredFieldForVectorField; import static org.opensearch.knn.index.mapper.KNNVectorFieldMapperUtil.buildDocValuesFieldType; @@ -33,7 +33,7 @@ */ public class LuceneFieldMapper extends KNNVectorFieldMapper { - private static final int LUCENE_MAX_DIMENSION = MAX_DIMENSIONS; + private static final int LUCENE_MAX_DIMENSION = KnnVectorsFormat.DEFAULT_MAX_DIMENSIONS; /** FieldType used for initializing VectorField, which is used for creating binary doc values. **/ private final FieldType vectorFieldType; diff --git a/src/main/java/org/opensearch/knn/index/util/KNNEngine.java b/src/main/java/org/opensearch/knn/index/util/KNNEngine.java index 776ea5366..197bb87f3 100644 --- a/src/main/java/org/opensearch/knn/index/util/KNNEngine.java +++ b/src/main/java/org/opensearch/knn/index/util/KNNEngine.java @@ -6,7 +6,7 @@ package org.opensearch.knn.index.util; import com.google.common.collect.ImmutableSet; -import org.apache.lucene.index.VectorValues; +import org.apache.lucene.codecs.KnnVectorsFormat; import org.opensearch.common.ValidationException; import org.opensearch.knn.index.KNNMethod; import org.opensearch.knn.index.KNNMethodContext; @@ -40,7 +40,7 @@ public enum KNNEngine implements KNNLibrary { KNNEngine.FAISS, 16_000, KNNEngine.LUCENE, - VectorValues.MAX_DIMENSIONS + KnnVectorsFormat.DEFAULT_MAX_DIMENSIONS ); /**