public class IntegerCodingPostingIndexInputStream extends Object implements PostingIndexInputStream, Skipable
Modifier and Type | Field and Description |
---|---|
protected IntegerCodec |
blocksCodec |
protected int |
chunkSize |
protected int |
currentEntryCount |
protected byte |
currentFile |
protected BitIndexPointer |
currentPointer |
protected DocumentIndex |
documentIndex |
protected int |
entriesSkipped |
protected IntegerCodec |
fieldsCodec |
protected int |
fieldsCount |
protected ByteIn |
file
The compressed file containing the terms.
|
protected byte |
fileCount |
protected int |
hasBlocks |
protected IntegerCodec |
idsCodec |
protected IndexOnDisk |
index |
protected static org.slf4j.Logger |
logger |
protected int |
maxBlocks |
protected Iterator<? extends BitIndexPointer> |
pointerList
the lexicon input stream providing the offsets
|
protected String |
structureName |
protected IntegerCodec |
tfsCodec |
Constructor and Description |
---|
IntegerCodingPostingIndexInputStream(IndexOnDisk _index,
String _structureName,
Iterator<? extends BitIndexPointer> _pointerList)
Constructs an instance
|
Modifier and Type | Method and Description |
---|---|
protected BitIndexPointer |
_next() |
void |
close() |
Pointer |
getCurrentPointer()
Returns the pointer associated with the current postings being accessed
|
protected DocumentIndex |
getDocumentIndex(BitIndexPointer pointer) |
int |
getEntriesSkipped()
Returns the number of entries that were skipped during
a call to the next().
|
static String |
getFilename(IndexOnDisk _index,
String structureName,
byte fileCount,
byte fileId)
Returns filename
|
static String |
getFilename(String path,
String prefix,
String structureName,
byte fileCount,
byte fileId)
Return filename
|
IterablePosting |
getNextPostings()
Return the next IterablePosting object, or null if none defined.
|
int |
getNumberOfCurrentPostings()
Returns the number of postings in the current IterablePosting object
|
BitFilePosition |
getPos()
Get the file position
|
boolean |
hasNext() |
protected IterablePosting |
loadPostingIterator(BitIndexPointer pointer) |
IterablePosting |
next() |
void |
print()
Print a list of the postings to standard out
|
void |
remove()
Not supported
|
void |
skip(int numEntries)
Skip forward the specified number of entries.
|
protected static final org.slf4j.Logger logger
protected final Iterator<? extends BitIndexPointer> pointerList
protected ByteIn file
protected int currentEntryCount
protected BitIndexPointer currentPointer
protected int entriesSkipped
protected byte fileCount
protected byte currentFile
protected IndexOnDisk index
protected DocumentIndex documentIndex
protected String structureName
protected final int fieldsCount
protected final int hasBlocks
protected final int maxBlocks
protected int chunkSize
protected IntegerCodec idsCodec
protected IntegerCodec tfsCodec
protected IntegerCodec fieldsCodec
protected IntegerCodec blocksCodec
public IntegerCodingPostingIndexInputStream(IndexOnDisk _index, String _structureName, Iterator<? extends BitIndexPointer> _pointerList) throws IOException
_index
- _structureName
- _pointerList
- IOException
public static String getFilename(String path, String prefix, String structureName, byte fileCount, byte fileId)
path
- prefix
- structureName
- fileCount
- fileId
- public static String getFilename(IndexOnDisk _index, String structureName, byte fileCount, byte fileId)
_index
- structureName
- fileCount
- fileId
- public BitFilePosition getPos()
public void skip(int numEntries) throws IOException
skip
in interface Skipable
numEntries
- number of entries to skipIOException
- if an IO problem occurs.public int getNumberOfCurrentPostings()
getNumberOfCurrentPostings
in interface PostingIndexInputStream
public IterablePosting getNextPostings() throws IOException
getNextPostings
in interface PostingIndexInputStream
IOException
- if an I/O problem occurs.public boolean hasNext()
hasNext
in interface Iterator<IterablePosting>
protected BitIndexPointer _next()
public IterablePosting next()
next
in interface Iterator<IterablePosting>
public int getEntriesSkipped()
getEntriesSkipped
in interface PostingIndexInputStream
protected IterablePosting loadPostingIterator(BitIndexPointer pointer) throws IOException
IOException
protected DocumentIndex getDocumentIndex(BitIndexPointer pointer)
public void print()
print
in interface PostingIndexInputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void remove()
remove
in interface Iterator<IterablePosting>
public Pointer getCurrentPointer()
getCurrentPointer
in interface PostingIndexInputStream
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow