gf2121 commented on PR #12465:
URL: https://github.com/apache/lucene/pull/12465#issuecomment-1653041980

   Thanks @gautamworah96 for reporting this !
   
   I was adding the assert to guarantee the consistency between `disi.doc` and 
`disi.exists`. It could be surprising if `IndexedDISI#advanceExactWithinBlock` 
return `false` while `disi.exists = true`.
   
   `DocValuesIterator#advanceExact`, which is usually the interface exposed to 
normal users, says that: "target must be greater than or equal to the current 
doc ID". But the test you add was calling `advanceExact(i-1)` after 
`advanceExact(i)`. So this behavior is undefined under the API contract. I'm 
not very sure if we need to maintain the undefined behavior to keep consistent 
with before ?
   
   BTW, `IndexedDISI` did not extend `DocValuesIterator`. So it will make sense 
to me to add similar java doc on `IndexedDISI#advanceExact` if it is causing 
confusion.


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