Skip to content

Commit

Permalink
Change imports to align with core lucene upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bogan <[email protected]>
  • Loading branch information
ryanbogan committed Sep 20, 2023
1 parent ed7171e commit 6a82705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/opensearch/knn/index/util/KNNEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,7 +40,7 @@ public enum KNNEngine implements KNNLibrary {
KNNEngine.FAISS,
16_000,
KNNEngine.LUCENE,
VectorValues.MAX_DIMENSIONS
KnnVectorsFormat.DEFAULT_MAX_DIMENSIONS
);

/**
Expand Down

0 comments on commit 6a82705

Please sign in to comment.