kkewwei opened a new issue, #16991:
URL: https://github.com/apache/lucene/issues/16991

   ### Description
   
   During search, Lucene builds a `BulkScorer` for every segment. For numeric 
range query, we 
    may traverse the `BKD` and build the matching docs when building 
`BulkScorer`, which can be expensive.
   
   For constant score query, once the topN `queue` is full and the collected 
hits exceed `totalHitsThreshold`, later segments may no longer contain 
competitive documents. However, Lucene still build `BulkScorers` and performs 
the BKD work for them.
   
   This change makes `TopScoreDocCollector` terminate such segments from 
`getLeafCollector,` before build `BulkScorer`. It applies to 
`ConstantScoreWeight` and filter-only `BooleanQuery`.


-- 
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]

Reply via email to