Package com.yahoo.search.predicate.index
Class MultiIntervalPostingList
java.lang.Object
com.yahoo.search.predicate.index.MultiIntervalPostingList
- All Implemented Interfaces:
PostingList
- Direct Known Subclasses:
BoundsPostingList
,IntervalPostingList
,ZstarCompressedPostingList
Shared implementation for posting lists that may have multiple intervals.
- Author:
- Magnar Nedland, bjorncs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
getDocId()
final int[]
final long
final boolean
nextDocument
(int docId) Moves the posting list past the supplied document id.final boolean
Prepare iterator for interval iteration.protected abstract boolean
prepareIntervals
(int dataRef) final int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.yahoo.search.predicate.index.PostingList
getInterval, nextInterval
-
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 interfacePostingList
- 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 interfacePostingList
- Returns:
- True if the iterator has any intervals.
-
prepareIntervals
protected abstract boolean prepareIntervals(int dataRef) -
size
public final int size()- Specified by:
size
in interfacePostingList
- Returns:
- The number of documents (actual count or estimate)
-
getDocId
public final int getDocId()- Specified by:
getDocId
in interfacePostingList
- Returns:
- The doc id for the current document
-
getDocIds
public final int[] getDocIds()- Specified by:
getDocIds
in interfacePostingList
- Returns:
- The document ids
-
getSubquery
public final long getSubquery()- Specified by:
getSubquery
in interfacePostingList
- Returns:
- the subquery bitmap for this posting list.
-