Class LuceneFreqVector
java.lang.Object
es.uam.eps.ir.relison.content.index.freq.lucene.LuceneFreqVector
- All Implemented Interfaces:
FreqVector
,java.lang.Iterable<TermFreq>
public class LuceneFreqVector extends java.lang.Object implements FreqVector
Lucene implementation of a term vector.
-
Field Summary
Fields Modifier and Type Field Description (package private) LuceneFreqVectorIterator
iterator
Lucene iterator. -
Constructor Summary
Constructors Constructor Description LuceneFreqVector(org.apache.lucene.index.Terms terms)
Constructor. -
Method Summary
-
Field Details
-
iterator
LuceneFreqVectorIterator iteratorLucene iterator.
-
-
Constructor Details
-
LuceneFreqVector
public LuceneFreqVector(org.apache.lucene.index.Terms terms) throws java.io.IOExceptionConstructor.- Parameters:
terms
- the set of terms.- Throws:
java.io.IOException
- if something fails while creating the iterator.
-
-
Method Details
-
size
public long size()Description copied from interface:FreqVector
The number of terms in the vector.- Specified by:
size
in interfaceFreqVector
- Returns:
- the number of terms in the vector.
-
iterator
- Specified by:
iterator
in interfacejava.lang.Iterable<TermFreq>
-
getFreq
public long getFreq(java.lang.String term) throws java.io.IOExceptionDescription copied from interface:FreqVector
The frequency of the term in the vector.- Specified by:
getFreq
in interfaceFreqVector
- Parameters:
term
- the term.- Returns:
- the frequency of the term in the vector.
- Throws:
java.io.IOException
- if something fails while reading the vector.
-