Package org.terrier.structures.postings
Class PostingUtil.DocidSpecificDocumentIndex
- java.lang.Object
-
- org.terrier.structures.postings.PostingUtil.DocidSpecificDocumentIndex
-
- All Implemented Interfaces:
DocumentIndex
,FieldDocumentIndex
- Enclosing class:
- PostingUtil
public static class PostingUtil.DocidSpecificDocumentIndex extends java.lang.Object implements FieldDocumentIndex
-
-
Constructor Summary
Constructors Constructor Description DocidSpecificDocumentIndex(DocumentIndex _di, DocumentIndexEntry _die)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentIndexEntry
getDocumentEntry(int docid)
Return the document index entry based on its docid.int
getDocumentLength(int docid)
Return the length of the document.int[]
getFieldLengths(int docid)
Get the length of each fieldint
getNumberOfDocuments()
Return the number of documents.
-
-
-
Constructor Detail
-
DocidSpecificDocumentIndex
public DocidSpecificDocumentIndex(DocumentIndex _di, DocumentIndexEntry _die)
-
-
Method Detail
-
getDocumentEntry
public DocumentIndexEntry getDocumentEntry(int docid) throws java.io.IOException
Description copied from interface:DocumentIndex
Return the document index entry based on its docid.- Specified by:
getDocumentEntry
in interfaceDocumentIndex
- Returns:
- the document index entry based on its docid.
- Throws:
java.io.IOException
-
getDocumentLength
public int getDocumentLength(int docid) throws java.io.IOException
Description copied from interface:DocumentIndex
Return the length of the document.- Specified by:
getDocumentLength
in interfaceDocumentIndex
- Returns:
- the length of the document.
- Throws:
java.io.IOException
-
getNumberOfDocuments
public int getNumberOfDocuments()
Description copied from interface:DocumentIndex
Return the number of documents.- Specified by:
getNumberOfDocuments
in interfaceDocumentIndex
- Returns:
- the number of documents.
-
getFieldLengths
public int[] getFieldLengths(int docid) throws java.io.IOException
Description copied from interface:FieldDocumentIndex
Get the length of each field- Specified by:
getFieldLengths
in interfaceFieldDocumentIndex
- Throws:
java.io.IOException
-
-