|
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
public class InvertedIndex
This class implements the inverted index for performing retrieval, with field information optionally.
Field Summary | |
---|---|
static double |
FIELD_LOAD_FACTOR
This is used during retrieval for a rough guess sizing of the temporaryTerms arraylist in getDocuments() - retrieval with Fields. |
static double |
NORMAL_LOAD_FACTOR
This is used during retrieval for a rough guess sizing of the temporaryTerms arraylist in getDocuments(). |
Constructor Summary | |
---|---|
InvertedIndex(Lexicon lexicon)
Creates an instance of the HtmlInvertedIndex class using the lexicon. |
|
InvertedIndex(Lexicon lexicon,
java.lang.String filename)
Creates an instance of the HtmlInvertedIndex class using the given lexicon. |
|
InvertedIndex(Lexicon lexicon,
java.lang.String path,
java.lang.String prefix)
|
Method Summary | |
---|---|
void |
close()
Closes the underlying bit file. |
BitInSeekable |
getBitFile()
Returns the underlying bit file, in order to make more efficient use of the bit file during assigning scores to the retrieved documents. |
int[][] |
getDocuments(int termid)
Returns a two dimensional array containing the document ids, term frequencies and field scores for the given documents. |
int[][] |
getDocuments(LexiconEntry lEntry)
|
int[][] |
getDocuments(long sOffset,
byte sBitOffset,
long eOffset,
byte eBitOffset,
int df)
Returns a two dimensional array containing the document ids, term frequencies and field scores for the given documents. |
java.lang.String |
getInfo(int term)
Returns the information for a posting list in string format |
void |
print()
Prints out the inverted index file. |
void |
reOpenLegacyBitFile()
forces the data structure to reopen the underlying bitfile using the legacy implementation of BitFile (OldBitFile) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double NORMAL_LOAD_FACTOR
public static final double FIELD_LOAD_FACTOR
Constructor Detail |
---|
public InvertedIndex(Lexicon lexicon, java.lang.String path, java.lang.String prefix)
public InvertedIndex(Lexicon lexicon)
lexicon
- The lexicon used for retrievalpublic InvertedIndex(Lexicon lexicon, java.lang.String filename)
lexicon
- The lexicon used for retrievalfilename
- The name of the inverted fileMethod Detail |
---|
public void reOpenLegacyBitFile() throws java.io.IOException
java.io.IOException
public void print()
public int[][] getDocuments(LexiconEntry lEntry)
public int[][] getDocuments(int termid)
termid
- the identifier of the term whose documents we are looking for.
public int[][] getDocuments(long sOffset, byte sBitOffset, long eOffset, byte eBitOffset, int df)
sOffset
- start byte of the postings in the inverted filesBitOffset
- start bit of the postings in the inverted fileeOffset
- end byte of the postings in the inverted fileeBitOffset
- end bit of the postings in the inverted file
public java.lang.String getInfo(int term)
public void close()
close
in interface Closeable
public BitInSeekable getBitFile()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |