anl.aida.ae.lucene
Class TermScorer
java.lang.Object
anl.aida.ae.lucene.TermScorer
public class TermScorer
- extends java.lang.Object
Iterates through Terms in a Lucene Index
an applies a function to the term data.
Constructor Summary |
TermScorer()
Creates a new TermIterator. |
Method Summary |
void |
apply(org.apache.lucene.index.IndexReader reader,
TermFunction func)
Iterates over all the Terms in the index and applies the
specified function to them. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_SIZE
private static final int CACHE_SIZE
- See Also:
- Constant Field Values
BUFF_SIZE
private static final int BUFF_SIZE
- See Also:
- Constant Field Values
docs
private int[] docs
freqs
private int[] freqs
scoreCache
private float[] scoreCache
similarity
private org.apache.lucene.search.Similarity similarity
unscoredFields
private static java.util.Set<java.lang.String> unscoredFields
TermScorer
public TermScorer()
- Creates a new TermIterator.
apply
public void apply(org.apache.lucene.index.IndexReader reader,
TermFunction func)
throws java.io.IOException,
AIDAException
- Iterates over all the Terms in the index and applies the
specified function to them. The order of iteration is:
func.init();
for all Terms:
func.newTerm();
for all Documents:
func.apply();
func.done();
Note that terms are distinguished by text and field. So two terms
may have the same text but be indifferent fields.
- Parameters:
reader
- the reader to read the index with.func
- the function to apply to the Terms.
- Throws:
java.io.IOException
- if there is an error iterating over the index
AIDAException
- if there is an error with the TermFunction