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
Modifier and TypeMethodDescriptionint
getDocId()
int[]
int
long
boolean
nextDocument
(int docId) Moves the posting list past the supplied document id.boolean
Fetches the next interval for the current document.boolean
Prepare iterator for interval iteration.int
size()
-
Method Details
-
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
-