Interface PostingList

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
OrdinalPostingList
All Known Implementing Classes:
FilteringPostingList, IntArrayPostingList, MergePostingList, PackedLongsPostingList, PeekablePostingList, PostingList.EmptyPostingList, PostingsReader

public interface PostingList extends Closeable
Interface for advancing on and consuming a posting list.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PostingList
     
    static final long
     
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    advance(long targetRowID)
    Advances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID.
    default void
     
    default long
     
    default long
     
    long
    Retrieves the next segment row ID, not including row IDs that have been returned by advance(long).
    long
    Returns the upper bound of postings in the list.
  • Field Details

  • Method Details

    • close

      default void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • minimum

      default long minimum()
    • maximum

      default long maximum()
    • nextPosting

      long nextPosting() throws IOException
      Retrieves the next segment row ID, not including row IDs that have been returned by advance(long).
      Returns:
      next segment row ID
      Throws:
      IOException
    • size

      long size()
      Returns the upper bound of postings in the list. During a merge individual postings may be de-duplicated, so we can't return the exact size only the upper bound of the size.
    • advance

      long advance(long targetRowID) throws IOException
      Advances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID. Exhausts the iterator and returns END_OF_STREAM if the target is greater than the highest row ID.

      Note: Callers must use the return value of this method before calling nextPosting(), as calling that method will return the next posting, not the one to which we have just advanced.

      Parameters:
      targetRowID - target row ID to advance to
      Returns:
      first segment row ID which is >= the target row ID or END_OF_STREAM if one does not exist
      Throws:
      IOException