org.apache.mahout.utils.vectors.lucene
Class CachedTermInfo
java.lang.Object
org.apache.mahout.utils.vectors.lucene.CachedTermInfo
- All Implemented Interfaces:
- TermInfo
public class CachedTermInfo
- extends Object
- implements TermInfo
Caches TermEntries from a single field. Materializes all values in the TermEnum to memory (much like FieldCache)
Constructor Summary |
CachedTermInfo(org.apache.lucene.index.IndexReader reader,
String field,
int minDf,
int maxDfPercent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedTermInfo
public CachedTermInfo(org.apache.lucene.index.IndexReader reader,
String field,
int minDf,
int maxDfPercent)
throws IOException
- Throws:
IOException
totalTerms
public int totalTerms(String field)
- Specified by:
totalTerms
in interface TermInfo
getTermEntry
public TermEntry getTermEntry(String field,
String term)
- Specified by:
getTermEntry
in interface TermInfo
getAllEntries
public Iterator<TermEntry> getAllEntries()
- Specified by:
getAllEntries
in interface TermInfo
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.