public class MemoryInvertedIndex extends Object implements PostingIndex<MemoryPointer>, Serializable
Modifier and Type | Class and Description |
---|---|
class |
MemoryInvertedIndex.BasicMemoryPostingList |
class |
MemoryInvertedIndex.InvertedIterator
Inverted index iterator.
|
PostingIndex.DocidSpecificDocumentIndex
Modifier and Type | Field and Description |
---|---|
protected DocumentIndex |
doi |
protected Lexicon<String> |
lex |
protected gnu.trove.TIntObjectHashMap<MemoryPostingList> |
postings |
Constructor and Description |
---|
MemoryInvertedIndex(Lexicon<String> lex,
DocumentIndex doi)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int ptr,
int docid,
int freq)
Add posting to inverted file.
|
void |
close() |
DocumentIndex |
getDoi() |
IterablePosting |
getPostings(Pointer pointer)
Get the posting given a pointer
|
PostingIndexInputStream |
iterator()
Return an iterator over the inverted file.
|
void |
remove(int ptr)
Remove a term posting list from the index, e.g.
|
void |
setDoi(DocumentIndex doi) |
protected DocumentIndex doi
protected gnu.trove.TIntObjectHashMap<MemoryPostingList> postings
public MemoryInvertedIndex(Lexicon<String> lex, DocumentIndex doi)
public void add(int ptr, int docid, int freq)
public void remove(int ptr)
ptr
- public IterablePosting getPostings(Pointer pointer) throws IOException
getPostings
in interface PostingIndex<MemoryPointer>
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public PostingIndexInputStream iterator()
public DocumentIndex getDoi()
public void setDoi(DocumentIndex doi)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow