|
||||||||||
| 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,
java.lang.String structureName)
Constructs an instance of the class with the given index, using the specified structure name. |
|
DirectIndex(Index index,
java.lang.String structureName,
java.lang.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(java.lang.String[] args)
main |
| Methods inherited from class org.terrier.structures.BitPostingIndex |
|---|
close, getPostings |
| 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,
java.lang.String structureName)
throws java.io.IOException
index - The index to be usedstructureName - the name of this direct index
java.io.IOException
public DirectIndex(Index index,
java.lang.String structureName,
java.lang.Class<? extends IterablePosting> postingClass)
throws java.io.IOException
index - structureName - postingClass -
java.io.IOException| Method Detail |
|---|
public int[][] getTerms(int docid)
throws java.io.IOException
docid - the document identifier of the document which terms
we retrieve.
java.io.IOException
public int[][] getTerms(BitIndexPointer pointer)
throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||