From 5b216ebe919973f5507ff8d568a3fca31b09422c Mon Sep 17 00:00:00 2001 From: vigyasharma Date: Wed, 8 Jan 2025 11:42:45 -0800 Subject: [PATCH] Fix acceptOrds in EmptyOffHeapVectorValues to match no bits --- .../backward_codecs/lucene92/OffHeapFloatVectorValues.java | 2 +- .../backward_codecs/lucene94/OffHeapByteVectorValues.java | 2 +- .../backward_codecs/lucene94/OffHeapFloatVectorValues.java | 2 +- .../apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java | 2 +- .../apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java | 2 +- .../codecs/lucene99/OffHeapQuantizedByteVectorValues.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene92/OffHeapFloatVectorValues.java b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene92/OffHeapFloatVectorValues.java index 7c87bac5e54a..1a9969d464c5 100644 --- a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene92/OffHeapFloatVectorValues.java +++ b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene92/OffHeapFloatVectorValues.java @@ -256,7 +256,7 @@ public DocIndexIterator iterator() { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override diff --git a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapByteVectorValues.java b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapByteVectorValues.java index 0c428bb169f3..c8abcaad2998 100644 --- a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapByteVectorValues.java +++ b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapByteVectorValues.java @@ -270,7 +270,7 @@ public DocIndexIterator iterator() { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override diff --git a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapFloatVectorValues.java b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapFloatVectorValues.java index b21df901ddb6..a3a3ef5bfb11 100644 --- a/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapFloatVectorValues.java +++ b/lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene94/OffHeapFloatVectorValues.java @@ -269,7 +269,7 @@ public DocIndexIterator iterator() { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java index 1e78c8ea7aa2..feaa4340b88e 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapByteVectorValues.java @@ -315,7 +315,7 @@ public int ordToDoc(int ord) { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java index 2384657e93e1..096c56f9497f 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene95/OffHeapFloatVectorValues.java @@ -306,7 +306,7 @@ public DocIndexIterator iterator() { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene99/OffHeapQuantizedByteVectorValues.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene99/OffHeapQuantizedByteVectorValues.java index 051c926a679e..55c9e90d7078 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene99/OffHeapQuantizedByteVectorValues.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene99/OffHeapQuantizedByteVectorValues.java @@ -394,7 +394,7 @@ public int ordToDoc(int ord) { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); } @Override