|
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.DirectIndex
public class DirectIndex
A class that implements the direct index and saves information about whether a term appears in one of the specified fields.
Constructor Summary | |
---|---|
DirectIndex(DocumentIndex docIndex)
Constructs an instance of the direct index with the given document index, and a default name for the underlying direct file. |
|
DirectIndex(DocumentIndex docIndex,
java.lang.String filename)
Constructs an instance of the direct index with the given document index and a non-default name for the underlying direct file. |
|
DirectIndex(DocumentIndex docIndex,
java.lang.String path,
java.lang.String prefix)
|
Method Summary | |
---|---|
void |
close()
Closes the underlying bitfile compressed file. |
int[][] |
getTerms(int docid)
Returns a two dimensional array containing the term ids and the term frequencies for the given document. |
void |
print()
Prints out the direct 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 |
Constructor Detail |
---|
public DirectIndex(DocumentIndex docIndex)
docIndex
- The document index to be used.public DirectIndex(DocumentIndex docIndex, java.lang.String path, java.lang.String prefix)
public DirectIndex(DocumentIndex docIndex, java.lang.String filename)
docIndex
- The document index to be usedfilename
- the non-default filename used
for the underlying direct file.Method Detail |
---|
public void reOpenLegacyBitFile() throws java.io.IOException
java.io.IOException
public int[][] getTerms(int docid)
docid
- the document identifier of the document which terms
we retrieve.
public void print()
public void close()
close
in interface Closeable
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |