Class MemoryFieldsInvertedIndex
- java.lang.Object
-
- org.terrier.realtime.memory.MemoryInvertedIndex
-
- org.terrier.realtime.memory.fields.MemoryFieldsInvertedIndex
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Serializable
,java.lang.AutoCloseable
,PostingIndex<MemoryPointer>
public class MemoryFieldsInvertedIndex extends MemoryInvertedIndex
Postings list (non-compressed) (fields).- Since:
- 4.0
- Author:
- Stuart Mackie
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.realtime.memory.MemoryInvertedIndex
MemoryInvertedIndex.BasicMemoryPostingList, MemoryInvertedIndex.InvertedIterator
-
-
Field Summary
-
Fields inherited from class org.terrier.realtime.memory.MemoryInvertedIndex
doi, lex, postings
-
-
Constructor Summary
Constructors Constructor Description MemoryFieldsInvertedIndex(Lexicon<java.lang.String> lexicon, DocumentIndex docindex)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int termid, int docid, int freq, int[] fields)
Insert/update posting (docid,freq,(fields)).void
close()
IterablePosting
getPostings(Pointer _termid)
Returns the posting iterator given a pointer.-
Methods inherited from class org.terrier.realtime.memory.MemoryInvertedIndex
add, addOrUpdate, getDoi, iterator, remove, setDoi
-
-
-
-
Constructor Detail
-
MemoryFieldsInvertedIndex
public MemoryFieldsInvertedIndex(Lexicon<java.lang.String> lexicon, DocumentIndex docindex)
Constructor.
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classMemoryInvertedIndex
-
add
public void add(int termid, int docid, int freq, int[] fields)
Insert/update posting (docid,freq,(fields)).
-
getPostings
public IterablePosting getPostings(Pointer _termid) throws java.io.IOException
Returns the posting iterator given a pointer.- Specified by:
getPostings
in interfacePostingIndex<MemoryPointer>
- Overrides:
getPostings
in classMemoryInvertedIndex
- Returns:
- the posting iterator given a pointer.
- Throws:
java.io.IOException
-
-