You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2025/06/30 12:17:00 UTC
(lucene) 01/03: Using `BatchScoreBulkScorer` on `CombinedFieldQuery` (#14854)
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit b39a52266fa17792aa906d55eadb2140a2a5bbd1
Author: Samuel.G <11...@qq.com>
AuthorDate: Mon Jun 30 20:55:30 2025 +0900
Using `BatchScoreBulkScorer` on `CombinedFieldQuery` (#14854)
Co-authored-by: gesong.samuel <ge...@bytedance.com>
---
lucene/CHANGES.txt | 2 ++
.../core/src/java/org/apache/lucene/search/CombinedFieldQuery.java | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 52c03788ece..691a05effe6 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -104,6 +104,8 @@ Optimizations
* GITHUB#14772: Implement ConstantScoreScorer#nextDocsAndScores. (Ge Song)
+* GITHUB#14854: Using BatchScoreBulkScorer on CombinedFieldQuery. (Ge Song)
+
Bug Fixes
---------------------
* GITHUB#14654: ValueSource.fromDoubleValuesSource(dvs).getSortField() would throw errors when
diff --git a/lucene/core/src/java/org/apache/lucene/search/CombinedFieldQuery.java b/lucene/core/src/java/org/apache/lucene/search/CombinedFieldQuery.java
index 57df9d6145a..1dcd0565b2f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/CombinedFieldQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/CombinedFieldQuery.java
@@ -395,6 +395,11 @@ public final class CombinedFieldQuery extends Query implements Accountable {
public long cost() {
return finalCost;
}
+
+ @Override
+ public BulkScorer bulkScorer() throws IOException {
+ return new BatchScoreBulkScorer(get(Long.MAX_VALUE));
+ }
};
}