Package com.yahoo.search.predicate.index
Class ZeroConstraintPostingList
java.lang.Object
com.yahoo.search.predicate.index.ZeroConstraintPostingList
- All Implemented Interfaces:
PostingList
Wraps an int stream of document ids into a PostingList.
All documents in the stream are considered matches.
- Author:
- Magnar Nedland, bjorncs
-
Constructor Summary
-
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()
-
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 interfacePostingList
- 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 interfacePostingList
- 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 interfacePostingList
- Returns:
- True if there was a next interval
-
size
public int size()- Specified by:
size
in interfacePostingList
- Returns:
- The number of documents (actual count or estimate)
-
getInterval
public int getInterval()- Specified by:
getInterval
in interfacePostingList
- Returns:
- The current interval for the current document
-
getDocId
public int getDocId()- Specified by:
getDocId
in interfacePostingList
- Returns:
- The doc id for the current document
-
getSubquery
public long getSubquery()- Specified by:
getSubquery
in interfacePostingList
- Returns:
- the subquery bitmap for this posting list.
-
getDocIds
public int[] getDocIds()- Specified by:
getDocIds
in interfacePostingList
- Returns:
- The document ids
-