Class MultiIntervalPostingList

java.lang.Object
com.yahoo.search.predicate.index.MultiIntervalPostingList
All Implemented Interfaces:
PostingList
Direct Known Subclasses:
BoundsPostingList, IntervalPostingList, ZstarCompressedPostingList

public abstract class MultiIntervalPostingList extends Object implements PostingList
Shared implementation for posting lists that may have multiple intervals.
Author:
Magnar Nedland, bjorncs
  • Constructor Details

    • MultiIntervalPostingList

      public MultiIntervalPostingList(int[] docIds, int[] dataRefs, long subquery)
  • Method Details

    • nextDocument

      public final boolean nextDocument(int docId)
      Description copied from interface: PostingList
      Moves the posting list past the supplied document id.
      Specified by:
      nextDocument in interface PostingList
      Parameters:
      docId - Document id to move past.
      Returns:
      True if a new document was found
    • prepareIntervals

      public final boolean prepareIntervals()
      Description copied from interface: PostingList
      Prepare iterator for interval iteration.
      Specified by:
      prepareIntervals in interface PostingList
      Returns:
      True if the iterator has any intervals.
    • prepareIntervals

      protected abstract boolean prepareIntervals(int dataRef)
    • size

      public final int size()
      Specified by:
      size in interface PostingList
      Returns:
      The number of documents (actual count or estimate)
    • getDocId

      public final int getDocId()
      Specified by:
      getDocId in interface PostingList
      Returns:
      The doc id for the current document
    • getDocIds

      public final int[] getDocIds()
      Specified by:
      getDocIds in interface PostingList
      Returns:
      The document ids
    • getSubquery

      public final long getSubquery()
      Specified by:
      getSubquery in interface PostingList
      Returns:
      the subquery bitmap for this posting list.