diff --git a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableByteVectorValues.java b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableByteVectorValues.java index de484dfdb222c..362210539c779 100644 --- a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableByteVectorValues.java +++ b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableByteVectorValues.java @@ -19,11 +19,11 @@ public interface BulkScorableByteVectorValues extends BulkScorableVectorValues { * Returns a {@link BulkVectorScorer} that can score against the provided {@code target} vector. * It will score to the fastest speed possible, potentially sacrificing some fidelity. */ - BulkVectorScorer scorer(byte[] target) throws IOException; + BulkVectorScorer bulkScorer(byte[] target) throws IOException; /** * Returns a {@link BulkVectorScorer} that can rescore against the provided {@code target} vector. * It will score to the highest fidelity possible, potentially sacrificing some speed. */ - BulkVectorScorer rescorer(byte[] target) throws IOException; + BulkVectorScorer bulkRescorer(byte[] target) throws IOException; } diff --git a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableFloatVectorValues.java b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableFloatVectorValues.java index 82f8de260a644..605e731911c51 100644 --- a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableFloatVectorValues.java +++ b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableFloatVectorValues.java @@ -19,11 +19,11 @@ public interface BulkScorableFloatVectorValues extends BulkScorableVectorValues * Returns a {@link BulkVectorScorer} that can score against the provided {@code target} vector. * It will score to the fastest speed possible, potentially sacrificing some fidelity. */ - BulkVectorScorer scorer(float[] target) throws IOException; + BulkVectorScorer bulkScorer(float[] target) throws IOException; /** * Returns a {@link BulkVectorScorer} that can rescore against the provided {@code target} vector. * It will score to the highest fidelity possible, potentially sacrificing some speed. */ - BulkVectorScorer rescorer(float[] target) throws IOException; + BulkVectorScorer bulkRescorer(float[] target) throws IOException; } diff --git a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableVectorValues.java b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableVectorValues.java index 89e9070f9780f..800eefb3f6118 100644 --- a/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableVectorValues.java +++ b/server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableVectorValues.java @@ -23,16 +23,16 @@ public interface BulkScorableVectorValues { interface BulkVectorScorer extends VectorScorer { /** - * Returns a {@link Bulk} scorer that can score in bulk the provided {@code matchingDocs}. + * Returns a {@link BulkScorer} scorer that can score in bulk the provided {@code matchingDocs}. */ - Bulk bulk(DocIdSetIterator matchingDocs) throws IOException; + BulkScorer bulkScore(DocIdSetIterator matchingDocs) throws IOException; - interface Bulk { + interface BulkScorer { /** * Scores up to {@code nextCount} docs in the provided {@code buffer}. * Returns the maxScore of docs scored. */ - float nextDocsAndScores(int nextCount, Bits liveDocs, DocAndFloatFeatureBuffer buffer) throws IOException; + void nextDocsAndScores(int nextCount, Bits liveDocs, DocAndFloatFeatureBuffer buffer) throws IOException; } } } diff --git a/server/src/main/java/org/elasticsearch/search/vectors/RescoreKnnVectorQuery.java b/server/src/main/java/org/elasticsearch/search/vectors/RescoreKnnVectorQuery.java index fb54a7e021375..3d67b8af5cf54 100644 --- a/server/src/main/java/org/elasticsearch/search/vectors/RescoreKnnVectorQuery.java +++ b/server/src/main/java/org/elasticsearch/search/vectors/RescoreKnnVectorQuery.java @@ -317,9 +317,9 @@ private void rescoreBulk( List queue, DocIdSetIterator filterIterator ) throws IOException { - BulkScorableVectorValues.BulkVectorScorer vectorReScorer = rescorableVectorValues.rescorer(floatTarget); + BulkScorableVectorValues.BulkVectorScorer vectorReScorer = rescorableVectorValues.bulkRescorer(floatTarget); var iterator = vectorReScorer.iterator(); - BulkScorableVectorValues.BulkVectorScorer.Bulk bulkScorer = vectorReScorer.bulk(filterIterator); + BulkScorableVectorValues.BulkVectorScorer.BulkScorer bulkScorer = vectorReScorer.bulkScore(filterIterator); DocAndFloatFeatureBuffer buffer = new DocAndFloatFeatureBuffer(); while (iterator.docID() != DocIdSetIterator.NO_MORE_DOCS) { // iterator already takes live docs into account