Hi, 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. I'm a bit confused here since I thought in most places lucene assumes undefined behavior after NO_MORE_DOCS are returned for those method should be called only after "advance", but for "nextInterval" seems its not the case. Should we change the current behavior of "nextInterval" implementations or add some caution comment to javadoc?
Thanks Patrick Zhai
