Skip to content

Commit

Permalink
Make bitset param nullable
Browse files Browse the repository at this point in the history
Signed-off-by: Vijayan Balasubramanian <[email protected]>
  • Loading branch information
VijayanB committed Sep 27, 2024
1 parent b1e00ee commit 7b53e0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BitSet;
import org.apache.lucene.util.BitSetIterator;
import org.opensearch.common.Nullable;
import org.opensearch.knn.index.SpaceType;
import org.opensearch.knn.index.vectorvalues.KNNBinaryVectorValues;

Expand All @@ -28,7 +29,7 @@ public class ByteVectorIdsKNNIterator implements KNNIterator {
protected int docId;

public ByteVectorIdsKNNIterator(
final BitSet filterIdsBitSet,
@Nullable final BitSet filterIdsBitSet,
final byte[] queryVector,
final KNNBinaryVectorValues binaryVectorValues,
final SpaceType spaceType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BitSet;
import org.opensearch.common.Nullable;
import org.opensearch.knn.index.SpaceType;
import org.opensearch.knn.index.vectorvalues.KNNBinaryVectorValues;

Expand All @@ -21,7 +22,7 @@ public class NestedByteVectorIdsKNNIterator extends ByteVectorIdsKNNIterator {
private final BitSet parentBitSet;

public NestedByteVectorIdsKNNIterator(
final BitSet filterIdsArray,
@Nullable final BitSet filterIdsArray,
final byte[] queryVector,
final KNNBinaryVectorValues binaryVectorValues,
final SpaceType spaceType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BitSet;
import org.opensearch.common.Nullable;
import org.opensearch.knn.index.SpaceType;
import org.opensearch.knn.index.query.SegmentLevelQuantizationInfo;
import org.opensearch.knn.index.vectorvalues.KNNFloatVectorValues;
Expand All @@ -22,7 +23,7 @@ public class NestedVectorIdsKNNIterator extends VectorIdsKNNIterator {
private final BitSet parentBitSet;

NestedVectorIdsKNNIterator(
final BitSet filterIdsArray,
@Nullable final BitSet filterIdsArray,
final float[] queryVector,
final KNNFloatVectorValues knnFloatVectorValues,
final SpaceType spaceType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BitSet;
import org.apache.lucene.util.BitSetIterator;
import org.opensearch.common.Nullable;
import org.opensearch.knn.index.SpaceType;
import org.opensearch.knn.index.query.SegmentLevelQuantizationInfo;
import org.opensearch.knn.index.query.SegmentLevelQuantizationUtil;
Expand All @@ -32,7 +33,7 @@ public class VectorIdsKNNIterator implements KNNIterator {
private final SegmentLevelQuantizationInfo segmentLevelQuantizationInfo;

VectorIdsKNNIterator(
final BitSet filterIdsBitSet,
@Nullable final BitSet filterIdsBitSet,
final float[] queryVector,
final KNNFloatVectorValues knnFloatVectorValues,
final SpaceType spaceType
Expand Down

0 comments on commit 7b53e0c

Please sign in to comment.