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, newInstance
public void close()
public int[] decompressPositions(int index) throws IOException
index
- Index of the document id in the document id vectorIOException
public boolean equals(Object o)
equals
in class CompressedPostings
public static CompressedPositionalPostings newInstance(int[] data, List<TermPositions> positions) throws IOException
data
- An array of document idspositions
- List of TermPosition objects, one for each document idIOException
public void readFields(DataInput input) throws IOException
readFields
in interface Writable
readFields
in class CompressedPostings
IOException
public static CompressedPositionalPostings readInstance(DataInput input) throws IOException
input
- DataInputIOException
public void write(DataOutput output) throws IOException
write
in interface Writable
write
in class CompressedPostings
IOException