public class IntegerCodingIterablePosting extends Object implements IterablePosting, FieldPosting, BlockPosting
Modifier and Type | Field and Description |
---|---|
protected FieldDocumentIndex |
asFieldDocumentIndex
Deprecated.
|
protected int |
bf
Deprecated.
|
protected int[] |
bfs
Deprecated.
|
protected int |
blkCnt
Deprecated.
|
protected int[] |
blocks
Deprecated.
|
protected IntegerCodec |
blocksCodec
Deprecated.
|
protected int[] |
blocksMatrix
Deprecated.
|
protected int |
chunkSize
Deprecated.
Number of postings in a chunk
|
protected int |
currentPosting
Deprecated.
|
protected boolean |
decompressed
Deprecated.
|
protected DocumentIndex |
documentIndex
Deprecated.
|
protected int[] |
fields
Deprecated.
|
protected IntegerCodec |
fieldsCodec
Deprecated.
|
protected int |
fieldsCount
Deprecated.
|
protected int[][] |
fieldsMatrix
Deprecated.
|
protected int |
hasBlocks
Deprecated.
|
protected int |
id
Deprecated.
|
protected int[] |
ids
Deprecated.
|
protected IntegerCodec |
idsCodec
Deprecated.
|
protected ByteIn |
input
Deprecated.
|
protected static org.apache.log4j.Logger |
logger
Deprecated.
The logger used
|
protected int |
numberOfEntries
Deprecated.
|
protected int |
tf
Deprecated.
|
protected int[] |
tfs
Deprecated.
|
protected IntegerCodec |
tfsCodec
Deprecated.
|
EOL
Constructor and Description |
---|
IntegerCodingIterablePosting(ByteIn input,
int numberOfEntries,
DocumentIndex documentIndex,
int chunkSize,
int fieldCount,
int hasBlocks,
IntegerCodec idsCodec,
IntegerCodec tfsCodec,
IntegerCodec fieldsCodec,
IntegerCodec blocksCodec)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
WritablePosting |
asWritablePosting()
Deprecated.
Copies this posting to one free of an iterator.
|
void |
close()
Deprecated.
|
protected void |
decompress()
Deprecated.
This load the a chunk (tfs, fields and blocks (optionally)) and decompress it
|
boolean |
endOfPostings()
Deprecated.
Status method to see if this posting list iterator has been finished
|
protected void |
get(int pos)
Deprecated.
Read the posting components from the chunk
|
long |
getCurrentAddress()
Deprecated.
|
int |
getDocumentLength()
Deprecated.
Return the length of the document for this posting.
|
int[] |
getFieldFrequencies()
Deprecated.
Returns the frequencies of the term in each field of the document
|
int[] |
getFieldLengths()
Deprecated.
Returns the lengths of the each fields in the current document
|
int |
getFrequency()
Deprecated.
Return the frequency of the term in the current document
|
int |
getId()
Deprecated.
Return the id of the current posting.
|
int[] |
getPositions()
Deprecated.
Return positions of occurrences
|
protected void |
load()
Deprecated.
This load a chunk (just the document ids!) and decompress it
|
int |
next()
Deprecated.
Move this iterator to the next posting.
|
int |
next(int targetId)
Deprecated.
Move this iterator to the posting with specified id, or next posting after that.
|
void |
setFieldLengths(int[] newLengths)
Deprecated.
|
void |
setId(int id)
Deprecated.
It may be of benefit to update the frequency of the id in some applications.
|
protected void |
skip()
Deprecated.
If tfs, fields frequencies and blocks are not required, skip that
part of the chunk
|
String |
toString()
Deprecated.
Makes a human readable form of this posting
|
protected static final org.apache.log4j.Logger logger
protected DocumentIndex documentIndex
protected int chunkSize
protected int numberOfEntries
protected int currentPosting
protected int id
protected int tf
protected int[] fields
protected int bf
protected int[] blocks
protected final int[] ids
protected final int[] tfs
protected final int[][] fieldsMatrix
protected int[] bfs
protected int[] blocksMatrix
protected final int fieldsCount
protected FieldDocumentIndex asFieldDocumentIndex
protected final int hasBlocks
protected final ByteIn input
protected final IntegerCodec idsCodec
protected final IntegerCodec tfsCodec
protected final IntegerCodec fieldsCodec
protected final IntegerCodec blocksCodec
protected int blkCnt
protected boolean decompressed
public IntegerCodingIterablePosting(ByteIn input, int numberOfEntries, DocumentIndex documentIndex, int chunkSize, int fieldCount, int hasBlocks, IntegerCodec idsCodec, IntegerCodec tfsCodec, IntegerCodec fieldsCodec, IntegerCodec blocksCodec) throws IOException
input
- the input channelnumberOfEntries
- the number of postingsdocumentIndex
- the document indexchunkSize
- the size of the chunkfieldCount
- the number of fields (0 if the posting list has no fields)hasBlocks
- has this posting list posting positions? (0: no, 1:has positions, >1:has blocks)idsCodec
- the IntegerCodec to use to decode docIdstfsCodec
- the IntegerCodec to use to decode term frequenciesfieldsCodec
- the IntegerCodec to use to decode field frequencies (if any, null otherwise)blocksCodec
- the IntegerCodec to use to decode blocks (if any, null otherwise)IOException
public int getId()
Posting
public int getFrequency()
Posting
getFrequency
in interface Posting
public int getDocumentLength()
Posting
getDocumentLength
in interface Posting
public void setId(int id)
Posting
public WritablePosting asWritablePosting()
Posting
asWritablePosting
in interface Posting
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected final void load() throws IOException
IOException
protected final void decompress() throws IOException
IOException
protected final void skip() throws IOException
IOException
protected final void get(int pos) throws IOException
pos
- the posting to load (as index in the internal arrays)IOException
public int next() throws IOException
IterablePosting
next
in interface IterablePosting
IOException
public int next(int targetId) throws IOException
IterablePosting
next
in interface IterablePosting
targetId
- id of the posting to find in this postingn list.IOException
public boolean endOfPostings()
IterablePosting
endOfPostings
in interface IterablePosting
public int[] getPositions()
BlockPosting
getPositions
in interface BlockPosting
public int[] getFieldFrequencies()
FieldPosting
getFieldFrequencies
in interface FieldPosting
public int[] getFieldLengths()
FieldPosting
getFieldLengths
in interface FieldPosting
public void setFieldLengths(int[] newLengths)
setFieldLengths
in interface FieldPosting
public String toString()
public long getCurrentAddress()
Terrier 4.0. Copyright © 2004-2014 University of Glasgow