public class MemoryInvertedIndex extends Object implements PostingIndex<MemoryPointer>, Serializable
| Modifier and Type | Class and Description | 
|---|---|
| class  | MemoryInvertedIndex.BasicMemoryPostingList | 
| class  | MemoryInvertedIndex.InvertedIteratorInverted 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. | 
| boolean | addOrUpdate(int ptr,
           int docid,
           int freq)Adds or updates the frequency of the term denoted by ptr by freq. | 
| 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 boolean addOrUpdate(int ptr,
                  int docid,
                  int freq)
public void remove(int ptr)
ptr - public IterablePosting getPostings(Pointer pointer) throws IOException
getPostings in interface PostingIndex<MemoryPointer>IOExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic PostingIndexInputStream iterator()
public DocumentIndex getDoi()
public void setDoi(DocumentIndex doi)
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow