|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.terrier.structures.BitPostingIndex
org.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.
Field Summary | |
---|---|
protected DocumentIndex |
docIndex
The document index employed for retrieving the document offsets. |
protected static org.apache.log4j.Logger |
logger
The logger used for the Lexicon |
Fields inherited from class org.terrier.structures.BitPostingIndex |
---|
fieldCount, file, index, postingConstructor, postingImplementation |
Constructor Summary | |
---|---|
DirectIndex(Index index,
String structureName)
Constructs an instance of the class with the given index, using the specified structure name. |
|
DirectIndex(Index index,
String structureName,
Class<? extends IterablePosting> postingClass)
Constructs an instance of the class with |
Method Summary | |
---|---|
int[][] |
getTerms(BitIndexPointer pointer)
Get the terms for the document at the specified bit index pointer. |
int[][] |
getTerms(int docid)
Returns a two dimensional array containing the term ids and the term frequencies for the given document. |
static void |
main(String[] args)
main |
Methods inherited from class org.terrier.structures.BitPostingIndex |
---|
close, getPostings, setPostingImplementation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected DocumentIndex docIndex
Constructor Detail |
---|
public DirectIndex(Index index, String structureName) throws IOException
index
- The index to be usedstructureName
- the name of this direct index
IOException
public DirectIndex(Index index, String structureName, Class<? extends IterablePosting> postingClass) throws IOException
index
- structureName
- postingClass
-
IOException
Method Detail |
---|
public int[][] getTerms(int docid) throws IOException
docid
- the document identifier of the document which terms
we retrieve.
IOException
public int[][] getTerms(BitIndexPointer pointer) throws IOException
IOException
public static void main(String[] args) throws Exception
args
-
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |