Interface Index<C>
- Type Parameters:
C- type of the content identifier.
- All Superinterfaces:
DocumentMap<C>
- All Known Subinterfaces:
ForwardIndex<C>,IndividualContentIndex<C,U>
- All Known Implementing Classes:
AbstractIndex,AbstractIndividualContentIndex,LuceneForwardIndex,LuceneIndex,LucenePositionalIndex,WrapperIndividualContentIndex,WrapperIndividualForwardContentIndex
public interface Index<C> extends DocumentMap<C>
Interface for a content index.
-
Method Summary
Modifier and Type Method Description java.util.Collection<java.lang.String>getAllTerms()Obtains the set of all terms in the index dictionary.longgetDocFreq(java.lang.String term)Obtains the number of documents containing the term.PostingsListgetPostings(java.lang.String term)Obtains the posting list of a term.longgetTotalFreq(java.lang.String term)Obtains the total frequency of a term in the collection.Methods inherited from interface es.uam.eps.ir.relison.content.index.DocumentMap
getContent, getContentId, numDocs
-
Method Details
-
getPostings
Obtains the posting list of a term.- Parameters:
term- the term to look up.- Returns:
- the posting list of the term.
- Throws:
java.io.IOException- if something fails while reading the posting list.
-
getAllTerms
java.util.Collection<java.lang.String> getAllTerms() throws java.io.IOExceptionObtains the set of all terms in the index dictionary.- Returns:
- the collection of terms.
- Throws:
java.io.IOException- if something fails while reading the list of terms.
-
getTotalFreq
long getTotalFreq(java.lang.String term) throws java.io.IOExceptionObtains the total frequency of a term in the collection.- Parameters:
term- the term to look up.- Returns:
- the total frequency of the term in the collection.
- Throws:
java.io.IOException- if something fails while reading the frequency.
-
getDocFreq
long getDocFreq(java.lang.String term) throws java.io.IOExceptionObtains the number of documents containing the term.- Parameters:
term- the term to look up.- Returns:
- the number of documents containing the term.
- Throws:
java.io.IOException- if something fails while reading the doc frequency.
-