Haoyu Zhai created LUCENE-9618:
----------------------------------

             Summary: Improve IntervalIterator.nextInterval's 
behavior/documentation/test
                 Key: LUCENE-9618
                 URL: https://issues.apache.org/jira/browse/LUCENE-9618
             Project: Lucene - Core
          Issue Type: Improvement
          Components: modules/query
            Reporter: Haoyu Zhai


I'm trying to play around with my own {{IntervalSource}} and found out that 
{{nextInterval}} method of IntervalIterator will be called sometimes even after 
{{nextDoc}}/ {{docID}}/ {{advance}} method returns NO_MORE_DOCS.
 
After I dug a bit more I found that {{FilteringIntervalIterator.reset}} is 
calling an inner iterator's {{nextInterval}} regardless of what the result of 
{{nextDoc}}, and also most (if not all) existing {{IntervalIterator}}'s 
implementation do considered the case where {{nextInterval}} is called after 
{{nextDoc}} returns NO_MORE_DOCS.
 
We should probably update the javadoc and test if the behavior is necessary. Or 
we should change the current implementation to avoid this behavior
original email discussion thread:

https://markmail.org/message/7itbwk6ts3bo3gdh



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to