public class MemoryDocumentIndexFields extends MemoryDocumentIndex implements FieldDocumentIndex
Modifier and Type | Class and Description |
---|---|
class |
MemoryDocumentIndexFields.DocumentIterator |
class |
MemoryDocumentIndexFields.DocumentIterator2 |
docLengths
Constructor and Description |
---|
MemoryDocumentIndexFields()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocument(int length,
int[] flengths)
Add document length and field lengths to document index.
|
DocumentIndexEntry |
getDocumentEntry(int docid)
Get the document index entry based on its docid
|
int[] |
getFieldLengths(int docid)
Get the length of each field
|
Iterator<DocumentIndexEntry> |
iterator()
Return an iterator over the document index.
|
Iterator<Map.Entry<Integer,DocumentIndexEntry>> |
iteratorOverEntries()
Return an iterator over the document index.
|
addDocument, getDocumentLength, getNumberOfDocuments, setLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDocumentLength, getNumberOfDocuments
public void addDocument(int length, int[] flengths)
public int[] getFieldLengths(int docid)
getFieldLengths
in interface FieldDocumentIndex
public DocumentIndexEntry getDocumentEntry(int docid)
getDocumentEntry
in interface DocumentIndex
getDocumentEntry
in class MemoryDocumentIndex
public Iterator<Map.Entry<Integer,DocumentIndexEntry>> iteratorOverEntries()
iteratorOverEntries
in class MemoryDocumentIndex
public Iterator<DocumentIndexEntry> iterator()
iterator
in class MemoryDocumentIndex
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow