Class MemoryFieldsDirectIndex
- java.lang.Object
-
- org.terrier.realtime.memory.MemoryDirectIndex
-
- org.terrier.realtime.memory.fields.MemoryFieldsDirectIndex
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,PostingIndex<MemoryPointer>
public class MemoryFieldsDirectIndex extends MemoryDirectIndex
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MemoryFieldsDirectIndex.FieldDocumentPostingList
-
Nested classes/interfaces inherited from class org.terrier.realtime.memory.MemoryDirectIndex
MemoryDirectIndex.DirectIterator, MemoryDirectIndex.DocumentPostingList
-
-
Field Summary
-
Fields inherited from class org.terrier.realtime.memory.MemoryDirectIndex
doi, postings
-
-
Constructor Summary
Constructors Constructor Description MemoryFieldsDirectIndex(FieldDocumentIndex doi)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int ptr, int termid, int freq)
Add posting to direct file.void
add(int ptr, int termid, int freq, int[] fields)
Insert/update posting (docid,freq,(fields)).IterablePosting
getPostings(int docid)
PostingIndexInputStream
iterator()
Return an iterator over the inverted file.-
Methods inherited from class org.terrier.realtime.memory.MemoryDirectIndex
close, getPostings
-
-
-
-
Constructor Detail
-
MemoryFieldsDirectIndex
public MemoryFieldsDirectIndex(FieldDocumentIndex doi)
Constructor.
-
-
Method Detail
-
getPostings
public IterablePosting getPostings(int docid) throws java.io.IOException
- Overrides:
getPostings
in classMemoryDirectIndex
- Throws:
java.io.IOException
-
iterator
public PostingIndexInputStream iterator()
Return an iterator over the inverted file.- Overrides:
iterator
in classMemoryDirectIndex
-
add
public void add(int ptr, int termid, int freq, int[] fields)
Insert/update posting (docid,freq,(fields)).
-
add
public void add(int ptr, int termid, int freq)
Description copied from class:MemoryDirectIndex
Add posting to direct file.- Overrides:
add
in classMemoryDirectIndex
-
-