From 0c7163fc7755fbbf15360f2e18717d76686427ba Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Tue, 1 Oct 2024 09:31:26 -0400 Subject: [PATCH] Fix simple text byte vector iteration (#13842) --- .../lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java index 97a518701b0..0a8c4836321 100644 --- a/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java +++ b/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java @@ -434,6 +434,11 @@ public class SimpleTextKnnVectorsReader extends KnnVectorsReader { return binaryValue.bytes; } + @Override + public int ordToDoc(int ord) { + return entry.ordToDoc[ord]; + } + @Override public DocIndexIterator iterator() { return createSparseIterator();