expani commented on code in PR #14511:
URL: https://github.com/apache/lucene/pull/14511#discussion_r2059808880
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene103/Lucene103PostingsReader.java:
##########
@@ -1286,14 +1298,11 @@ public long cost() {
@Override
public int numLevels() {
- return indexHasFreq == false || level1LastDocID == NO_MORE_DOCS ?
1 : 2;
+ return level1LastDocID == NO_MORE_DOCS ? 1 : 2;
Review Comment:
I had made these changes to bring back the same behavior as 9.11.1
Without these changes, it doesn't read the skip data [ and exits here
](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/ImpactsDISI.java#L85)
right after the min competitive score is set.
Whereas in 9.11.1, it reads the skip data [by entering this part of
ImpactDISI](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/ImpactsDISI.java#L88-L97)
which @msfroh described in the mail chain
```
It was fast because (once the collector has filled its priority queue),
we'd check the (constant) impacts to find the first block that's strictly
better
than the min competitive score. Since all scores are equal, that would
quickly skip to the end.
```
Although, not keeping this achieves the same result. Should I add a TODO to
remove this later after we fix the scrorers you mentioned ?
Also, can this give incorrect results when norms are enabled ? Since, we are
not reading the impacts.
--
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]