## 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)`

Method Summary
`Iterator<TermEntry>` `getAllEntries()`
`TermEntry` `getTermEntry(String field, String term)`
`int` `totalTerms(String field)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CachedTermInfo

    public CachedTermInfo(org.apache.lucene.index.IndexReader reader,
                          String field,
                          int minDf,
                          int maxDfPercent)
                   throws IOException

Throws:
  `IOException`

Method Detail

### 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.