public class CompressedPositionalPostings extends CompressedPostings
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int[] |
decompressPositions(int index)
Retrieves positions for a document given a forward index and the index of the document
in the document id vector.
|
boolean |
equals(Object o) |
static CompressedPositionalPostings |
newInstance(int[] data,
List<TermPositions> positions)
Constructs an instance of this class by encoding the document ids as well as their term positions
|
void |
readFields(DataInput input) |
static CompressedPositionalPostings |
readInstance(DataInput input)
Reads and returns an instance of this class from input
|
void |
write(DataOutput output) |
decompressBlock, getBlockCount, getBlockNumber, getBlockSize, getBlockStartIndex, getPositionInBlock, isFirstElementInBlock, newInstancepublic void close()
public int[] decompressPositions(int index)
throws IOException
index - Index of the document id in the document id vectorIOExceptionpublic boolean equals(Object o)
equals in class CompressedPostingspublic static CompressedPositionalPostings newInstance(int[] data, List<TermPositions> positions) throws IOException
data - An array of document idspositions - List of TermPosition objects, one for each document idIOExceptionpublic void readFields(DataInput input) throws IOException
readFields in interface WritablereadFields in class CompressedPostingsIOExceptionpublic static CompressedPositionalPostings readInstance(DataInput input) throws IOException
input - DataInputIOExceptionpublic void write(DataOutput output) throws IOException
write in interface Writablewrite in class CompressedPostingsIOException