Package com.yahoo.search.predicate.index
Class ZeroConstraintPostingList
- java.lang.Object
-
- com.yahoo.search.predicate.index.ZeroConstraintPostingList
-
- All Implemented Interfaces:
PostingList
public class ZeroConstraintPostingList extends Object implements 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
Constructors Constructor Description ZeroConstraintPostingList(int[] docIds)
-
Method Summary
All Methods Instance Methods Concrete 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
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
-
-