Package com.yahoo.search.predicate.index
Class ZstarCompressedPostingList
- java.lang.Object
-
- com.yahoo.search.predicate.index.MultiIntervalPostingList
-
- com.yahoo.search.predicate.index.ZstarCompressedPostingList
-
- All Implemented Interfaces:
PostingList
public class ZstarCompressedPostingList extends MultiIntervalPostingList
Wraps a posting list of compressed NOT-features. The compression works by implying an interval of size 1 after each stored interval, unless the next interval starts with 16 bits of 0, in which case the current interval is extended to the next.- Author:
- Magnar Nedland, bjorncs
-
-
Constructor Summary
Constructors Constructor Description ZstarCompressedPostingList(PredicateIntervalStore store, int[] docIds, int[] dataRefs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getInterval()
boolean
nextInterval()
Fetches the next interval for the current document.protected boolean
prepareIntervals(int dataRef)
-
Methods inherited from class com.yahoo.search.predicate.index.MultiIntervalPostingList
getDocId, getDocIds, getSubquery, nextDocument, prepareIntervals, size
-
-
-
-
Constructor Detail
-
ZstarCompressedPostingList
public ZstarCompressedPostingList(PredicateIntervalStore store, int[] docIds, int[] dataRefs)
- Parameters:
docIds
- Posting list as a stream.
-
-
Method Detail
-
prepareIntervals
protected boolean prepareIntervals(int dataRef)
- Specified by:
prepareIntervals
in classMultiIntervalPostingList
-
nextInterval
public boolean nextInterval()
Description copied from interface:PostingList
Fetches the next interval for the current document.- Returns:
- True if there was a next interval
-
getInterval
public int getInterval()
- Returns:
- The current interval for the current document
-
-