Class ZeroConstraintPostingList

java.lang.Object
com.yahoo.search.predicate.index.ZeroConstraintPostingList
All Implemented Interfaces:
PostingList

public class ZeroConstraintPostingList extends Object implements PostingList
Wraps an int stream of document ids into a PostingList. All documents in the stream are considered matches.
Author:
Magnar Nedland, bjorncs
  • Constructor Details

    • ZeroConstraintPostingList

      public ZeroConstraintPostingList(int[] docIds)
  • Method Details

    • nextDocument

      public 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 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.
    • nextInterval

      public boolean nextInterval()
      Description copied from interface: PostingList
      Fetches the next interval for the current document.
      Specified by:
      nextInterval in interface PostingList
      Returns:
      True if there was a next interval
    • size

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

      public int getInterval()
      Specified by:
      getInterval in interface PostingList
      Returns:
      The current interval for the current document
    • getDocId

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

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

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