public class MemoryDocumentIndexMap extends MemoryDocumentIndex
| Modifier and Type | Class and Description |
|---|---|
class |
MemoryDocumentIndexMap.DocumentMapIterator2
Document index iterator, iterates over DocumentIndexEntry only, not Entry
|
MemoryDocumentIndex.DocumentIterator, MemoryDocumentIndex.DocumentIterator2docLengths| Constructor and Description |
|---|
MemoryDocumentIndexMap()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDocument(int docid,
int length)
Add document length to document index.
|
void |
close() |
DocumentIndexEntry |
getDocumentEntry(int docid)
Get the document index entry based on its docid
|
int |
getDocumentLength(int docid)
Get the length of the document
|
int |
getNumberOfDocuments()
Get the number of documents
|
Iterator<DocumentIndexEntry> |
iterator()
Return an iterator over the document index.
|
Iterator<Map.Entry<Integer,DocumentIndexEntry>> |
iteratorOverEntries()
Return an iterator over the document index.
|
addDocument, setLengthpublic void addDocument(int docid,
int length)
public DocumentIndexEntry getDocumentEntry(int docid)
getDocumentEntry in interface DocumentIndexgetDocumentEntry in class MemoryDocumentIndexpublic int getDocumentLength(int docid)
getDocumentLength in interface DocumentIndexgetDocumentLength in class MemoryDocumentIndexpublic int getNumberOfDocuments()
MemoryDocumentIndexgetNumberOfDocuments in interface DocumentIndexgetNumberOfDocuments in class MemoryDocumentIndexpublic Iterator<Map.Entry<Integer,DocumentIndexEntry>> iteratorOverEntries()
MemoryDocumentIndexiteratorOverEntries in class MemoryDocumentIndexpublic Iterator<DocumentIndexEntry> iterator()
MemoryDocumentIndexiterator in class MemoryDocumentIndexpublic void close()
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow