Package com.yahoo.search.predicate.index
Interface PostingList
-
- All Known Implementing Classes:
BoundsPostingList
,IntervalPostingList
,MultiIntervalPostingList
,ZeroConstraintPostingList
,ZstarCompressedPostingList
public interface PostingList
Interface for posting lists to be used by the algorithm implemented in PredicateSearch.- Author:
- Magnar Nedland
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDocId()
int[]
getDocIds()
int
getInterval()
long
getSubquery()
boolean
nextDocument(int docId)
Moves the posting list past the supplied document id.boolean
nextInterval()
Fetches the next interval for the current document.boolean
prepareIntervals()
Prepare iterator for interval iteration.int
size()
-
-
-
Method Detail
-
nextDocument
boolean nextDocument(int docId)
Moves the posting list past the supplied document id.- Parameters:
docId
- Document id to move past.- Returns:
- True if a new document was found
-
prepareIntervals
boolean prepareIntervals()
Prepare iterator for interval iteration.- Returns:
- True if the iterator has any intervals.
-
nextInterval
boolean nextInterval()
Fetches the next interval for the current document.- Returns:
- True if there was a next interval
-
getDocId
int getDocId()
- Returns:
- The doc id for the current document
-
size
int size()
- Returns:
- The number of documents (actual count or estimate)
-
getInterval
int getInterval()
- Returns:
- The current interval for the current document
-
getSubquery
long getSubquery()
- Returns:
- the subquery bitmap for this posting list.
-
getDocIds
int[] getDocIds()
- Returns:
- The document ids
-
-