benwtrent commented on issue #14517:
URL: https://github.com/apache/lucene/issues/14517#issuecomment-2812913299

   Thinking about the first stack trace more, it may actually be because 
`windowBase > windowMax`. Following the trace up, we reach 
`DenseConjunctionBulkScorer#scoreWindow`, where `int bitsetWindowMax = (int) 
Math.min(minDocIDRunEnd, (long) WINDOW_SIZE + min);`
   
   Where `bitsetWindowMax` is passed as `windowMax` down stack, and `min` is 
passed as window base. 
   
   If `minDocIDRunEnd` somehow got set to something that is actually less than 
`min`, we could end up in this position.
   
   Looking at how its set:
   
   ```
       for (DisiWrapper w : iterators) {
         int docIdRunEnd = w.docIDRunEnd();
         if (w.docID() > min || docIdRunEnd < minRunEndThreshold) {
           windowApproximations.add(w.approximation());
           if (w.twoPhase() != null) {
             windowTwoPhases.add(w.twoPhase());
           }
         } else {
           minDocIDRunEnd = Math.min(minDocIDRunEnd, docIdRunEnd);
         }
       }
   ```
   Possibly `docIDRunEnd()` as returned from one of the iterators is actually < 
`min` but its `docId>min`? that seems weird...
   
   I will keep reading. Maybe its further up stack and the min/max provided to 
`scoreWindow` is already out of whack...


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