fthevenet commented on PR #12212:
URL: https://github.com/apache/lucene/pull/12212#issuecomment-1488891278

   I now believe I know what is going on: I initially changed the iterator to 
advanced on to `baseApproximation` based on my findings that this causes a bug 
in one of the three hit collection code path, namely the one used when base 
query is highly constraining vs the drilldowns (`doQueryFirstScoring`). 
   But... while that fixed the problem there, it is causing trouble with the 
other two (doDrillDownAdvanceScoring and doUnionScoring) which AFAICT are 
unaware of the "two phase" iterator pattern and always call on `baseIterator`, 
and so expect that an initial call to `baseIterator::nextDoc` had already been 
made, hence the failing test cases.
   
   So moved the base scorer initialization inside the condition that determines 
the code path to follow, so that it can be done on either `baseApproximation` 
or `baseIterator` depending on what the following method needs.
   It's arguably not the most elegant way to do it but I figured it was the 
less risky one, as it keeps changes to the rest of the code down to a minimum 
(and I certainly don't pretend to understand that code well enough to start 
hacking at it willy-nilly 😅 )
   
   All the randomized test I've ran since that change have passed (as well as 
the specific test I added), so hopefully its right this time!


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