|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.structures.InvertedIndex uk.ac.gla.terrier.structures.BlockInvertedIndex
public class BlockInvertedIndex
This class implements the block field inverted index for performing retrieval.
Field Summary |
---|
Fields inherited from class uk.ac.gla.terrier.structures.InvertedIndex |
---|
FIELD_LOAD_FACTOR, NORMAL_LOAD_FACTOR |
Constructor Summary | |
---|---|
BlockInvertedIndex(Lexicon lexicon)
Creates an instance of the BlockInvertedIndex class using the given lexicon. |
|
BlockInvertedIndex(Lexicon lexicon,
java.lang.String filename)
Creates an instance of the BlockInvertedIndex class using the given lexicon. |
|
BlockInvertedIndex(Lexicon lexicon,
java.lang.String path,
java.lang.String prefix)
|
Method Summary | |
---|---|
int[][] |
getDocuments(int termid)
Returns a two dimensional array containing the document ids, term frequencies and field scores for the given documents. |
int[][] |
getDocuments(long startOffset,
byte startBitOffset,
long endOffset,
byte endBitOffset,
int df)
Returns a 2D array containing the document ids, the term frequencies, the field scores the block frequencies and the block ids for the given documents. |
int[][] |
getDocumentsWithoutBlocks(int termid)
|
int[][] |
getDocumentsWithoutBlocks(LexiconEntry lEntry)
|
int[][] |
getDocumentsWithoutBlocks(long startOffset,
byte startBitOffset,
long endOffset,
byte endBitOffset,
int df)
|
void |
print()
Prints out the block inverted index file. |
void |
setIndex(Index i)
let it know which index to use |
Methods inherited from class uk.ac.gla.terrier.structures.InvertedIndex |
---|
close, getBitFile, getDocuments, getInfo, reOpenLegacyBitFile |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockInvertedIndex(Lexicon lexicon)
lexicon
- The lexicon used for retrievalpublic BlockInvertedIndex(Lexicon lexicon, java.lang.String path, java.lang.String prefix)
public BlockInvertedIndex(Lexicon lexicon, java.lang.String filename)
lexicon
- The lexicon used for retrievalfilename
- the name of the inverted fileMethod Detail |
---|
public void setIndex(Index i)
setIndex
in interface IndexConfigurable
i
- Index object to usepublic void print()
print
in class InvertedIndex
public int[][] getDocuments(long startOffset, byte startBitOffset, long endOffset, byte endBitOffset, int df)
getDocuments
in class InvertedIndex
startOffset
- start byte of the postings in the inverted filestartBitOffset
- start bit of the postings in the inverted fileendOffset
- end byte of the postings in the inverted fileendBitOffset
- end bit of the postings in the inverted filedf
- the number of postings to expect
public int[][] getDocuments(int termid)
InvertedIndex
getDocuments
in class InvertedIndex
termid
- the identifier of the term whose documents we are looking for.
public int[][] getDocumentsWithoutBlocks(int termid)
public int[][] getDocumentsWithoutBlocks(LexiconEntry lEntry)
public int[][] getDocumentsWithoutBlocks(long startOffset, byte startBitOffset, long endOffset, byte endBitOffset, int df)
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |