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

Ensure sub-iterators of ConjunctionDISI are on the same document

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      Not completely sure if this is a bug.

      BitSetConjuctionDISI advances based on its lead  – DocIdSetIterator iterator, and doesn't consider that its another component – BitSetIterator may have already advanced passed a certain doc. This may result in duplicate documents.

      For example if BitSetConjuctionDISI  disi is composed of DocIdSetIterator a of docs  [0,1] and BitSetIterator b of docs [0,1].  Doing `b.nextDoc()` we are collecting doc0,  doing `disi.nextDoc` we again  collecting the same doc0.

      It seems that other conjunction iterators don't have this behaviour, if we are advancing any of their component pass a certain document, the whole conjunction iterator will also be advanced pass this document. 

       

      This behaviour was exposed in this PR

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mayyas Mayya Sharipova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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