benwtrent opened a new pull request, #12152:
URL: https://github.com/apache/lucene/pull/12152

   This commit fixes one major bug and has two minor performance improvements.
   
   In a pure disjunction case within the `BoolQuery` (and probably other 
times), the maximum score up to `NO_MORE_DOCS` is calculated. 
   
   `AbstractKnnVectorQuery.DocAndScoreQuery` was consistently adding the 
current leaf-context's docBase to the passed in parameter. This would cause 
`int` to rollover and `DocAndScoreQuery` would return `0` for its highest score 
in the segment when it obviously wasn't. 
   
   The two minor performance improvements are around `count` and 
`Weight#scorer`. 
   `segmentStarts` is a monotonically increasing start for each scored document 
indexed by leaf-segment ordinal. Consequently, if the upper and lower segments 
are equivalent, that means no docs match for this segment.
   
   Count is similarly calculated by the difference between upper and lower 
`segmentStarts` according to the segment ordinal.
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to