Skip to content

Commit e9629f3

Browse files
authored
Renaming bulk vector scoring interfaces (#135442)
We should ensure unique names to prevent clashing with the interfaces that Lucene will eventually provide.
1 parent 4539df3 commit e9629f3

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableByteVectorValues.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public interface BulkScorableByteVectorValues extends BulkScorableVectorValues {
1919
* Returns a {@link BulkVectorScorer} that can score against the provided {@code target} vector.
2020
* It will score to the fastest speed possible, potentially sacrificing some fidelity.
2121
*/
22-
BulkVectorScorer scorer(byte[] target) throws IOException;
22+
BulkVectorScorer bulkScorer(byte[] target) throws IOException;
2323

2424
/**
2525
* Returns a {@link BulkVectorScorer} that can rescore against the provided {@code target} vector.
2626
* It will score to the highest fidelity possible, potentially sacrificing some speed.
2727
*/
28-
BulkVectorScorer rescorer(byte[] target) throws IOException;
28+
BulkVectorScorer bulkRescorer(byte[] target) throws IOException;
2929
}

server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableFloatVectorValues.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public interface BulkScorableFloatVectorValues extends BulkScorableVectorValues
1919
* Returns a {@link BulkVectorScorer} that can score against the provided {@code target} vector.
2020
* It will score to the fastest speed possible, potentially sacrificing some fidelity.
2121
*/
22-
BulkVectorScorer scorer(float[] target) throws IOException;
22+
BulkVectorScorer bulkScorer(float[] target) throws IOException;
2323

2424
/**
2525
* Returns a {@link BulkVectorScorer} that can rescore against the provided {@code target} vector.
2626
* It will score to the highest fidelity possible, potentially sacrificing some speed.
2727
*/
28-
BulkVectorScorer rescorer(float[] target) throws IOException;
28+
BulkVectorScorer bulkRescorer(float[] target) throws IOException;
2929
}

server/src/main/java/org/elasticsearch/index/codec/vectors/BulkScorableVectorValues.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ public interface BulkScorableVectorValues {
2323
interface BulkVectorScorer extends VectorScorer {
2424

2525
/**
26-
* Returns a {@link Bulk} scorer that can score in bulk the provided {@code matchingDocs}.
26+
* Returns a {@link BulkScorer} scorer that can score in bulk the provided {@code matchingDocs}.
2727
*/
28-
Bulk bulk(DocIdSetIterator matchingDocs) throws IOException;
28+
BulkScorer bulkScore(DocIdSetIterator matchingDocs) throws IOException;
2929

30-
interface Bulk {
30+
interface BulkScorer {
3131
/**
3232
* Scores up to {@code nextCount} docs in the provided {@code buffer}.
3333
* Returns the maxScore of docs scored.
3434
*/
35-
float nextDocsAndScores(int nextCount, Bits liveDocs, DocAndFloatFeatureBuffer buffer) throws IOException;
35+
void nextDocsAndScores(int nextCount, Bits liveDocs, DocAndFloatFeatureBuffer buffer) throws IOException;
3636
}
3737
}
3838
}

server/src/main/java/org/elasticsearch/search/vectors/RescoreKnnVectorQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ private void rescoreBulk(
317317
List<ScoreDoc> queue,
318318
DocIdSetIterator filterIterator
319319
) throws IOException {
320-
BulkScorableVectorValues.BulkVectorScorer vectorReScorer = rescorableVectorValues.rescorer(floatTarget);
320+
BulkScorableVectorValues.BulkVectorScorer vectorReScorer = rescorableVectorValues.bulkRescorer(floatTarget);
321321
var iterator = vectorReScorer.iterator();
322-
BulkScorableVectorValues.BulkVectorScorer.Bulk bulkScorer = vectorReScorer.bulk(filterIterator);
322+
BulkScorableVectorValues.BulkVectorScorer.BulkScorer bulkScorer = vectorReScorer.bulkScore(filterIterator);
323323
DocAndFloatFeatureBuffer buffer = new DocAndFloatFeatureBuffer();
324324
while (iterator.docID() != DocIdSetIterator.NO_MORE_DOCS) {
325325
// iterator already takes live docs into account

0 commit comments

Comments
 (0)