Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9618

Improve IntervalIterator.nextInterval's behavior/documentation/test

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • modules/query
    • None
    • New

    Description

      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/thread/aytal77bgzl2zafm

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhai7631 Patrick Zhai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m