org.apache.mahout.utils.vectors.lucene
Class LuceneIterable
java.lang.Object
org.apache.mahout.utils.vectors.lucene.LuceneIterable
- All Implemented Interfaces:
- Iterable<Vector>
public final class LuceneIterable
- extends Object
- implements Iterable<Vector>
Iterable
counterpart to LuceneIterator
.
Constructor Summary |
LuceneIterable(org.apache.lucene.index.IndexReader reader,
String idField,
String field,
TermInfo terminfo,
Weight weight)
|
LuceneIterable(org.apache.lucene.index.IndexReader indexReader,
String idField,
String field,
TermInfo terminfo,
Weight weight,
double normPower)
|
LuceneIterable(org.apache.lucene.index.IndexReader indexReader,
String idField,
String field,
TermInfo terminfo,
Weight weight,
double normPower,
double maxPercentErrorDocs)
Produce a LuceneIterable that can create the Vector plus normalize it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_NORMALIZING
public static final double NO_NORMALIZING
- See Also:
- Constant Field Values
LuceneIterable
public LuceneIterable(org.apache.lucene.index.IndexReader reader,
String idField,
String field,
TermInfo terminfo,
Weight weight)
LuceneIterable
public LuceneIterable(org.apache.lucene.index.IndexReader indexReader,
String idField,
String field,
TermInfo terminfo,
Weight weight,
double normPower)
LuceneIterable
public LuceneIterable(org.apache.lucene.index.IndexReader indexReader,
String idField,
String field,
TermInfo terminfo,
Weight weight,
double normPower,
double maxPercentErrorDocs)
- Produce a LuceneIterable that can create the Vector plus normalize it.
- Parameters:
indexReader
- IndexReader
to read the documents from.idField
- field containing the id. May be null.field
- field to use for the VectornormPower
- the normalization value. Must be nonnegative, or NO_NORMALIZING
maxPercentErrorDocs
- the percentage of documents in the lucene index that can have a null term vector
iterator
public Iterator<Vector> iterator()
- Specified by:
iterator
in interface Iterable<Vector>
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.