gf2121 commented on code in PR #14293:
URL: https://github.com/apache/lucene/pull/14293#discussion_r1972872831
##########
lucene/core/src/java/org/apache/lucene/search/TermQuery.java:
##########
@@ -165,6 +165,17 @@ public Scorer get(long leadCost) throws IOException {
}
}
+ @Override
+ public BulkScorer bulkScorer() throws IOException {
+ if (scoreMode.needsScores() == false) {
+ DocIdSetIterator iterator = get(Long.MAX_VALUE).iterator();
+ int maxDoc = context.reader().maxDoc();
+ return ConstantScoreScorerSupplier.fromIterator(iterator, 0f,
scoreMode, maxDoc)
Review Comment:
Is it correct to return `MatchAllScorerSupplier#bulkScorer()`
when`getTermsEnum().docFreq() == maxDoc`?
##########
lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java:
##########
@@ -341,11 +341,10 @@ public ScorerSupplier scorerSupplier(LeafReaderContext
context) throws IOExcepti
if (allDocsMatch) {
// all docs have a value and all points are within bounds, so
everything matches
- return new ScorerSupplier() {
+ return new ConstantScoreScorerSupplier(score(), scoreMode,
reader.maxDoc()) {
Review Comment:
Can we return `MatchAllScorerSupplier` here as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]