Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
final class: TermInfosReader [javadoc | source]
java.lang.Object
   org.apache.lucene.index.TermInfosReader
This stores a monotonically increasing set of pairs in a Directory. Pairs are accessed either by Term or by ordinal position the set.
Constructor:
 TermInfosReader(Directory dir,
    String seg,
    FieldInfos fis) throws IOException, CorruptIndexException 
 TermInfosReader(Directory dir,
    String seg,
    FieldInfos fis,
    int readBufferSize) throws IOException, CorruptIndexException 
Method from org.apache.lucene.index.TermInfosReader Summary:
close,   get,   get,   getIndexDivisor,   getMaxSkipLevels,   getPosition,   getSkipInterval,   setIndexDivisor,   size,   terms,   terms
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.TermInfosReader Detail:
 final  void close() throws IOException 
 TermInfo get(Term term) throws IOException 
    Returns the TermInfo for a Term in the set, or null.
 final Term get(int position) throws IOException 
    Returns the nth term in the set.
 public int getIndexDivisor() 
    Returns the indexDivisor.
 public int getMaxSkipLevels() 
 final long getPosition(Term term) throws IOException 
    Returns the position of a Term in the set or -1.
 public int getSkipInterval() 
 public  void setIndexDivisor(int indexDivisor) throws IllegalStateException 

    Sets the indexDivisor, which subsamples the number of indexed terms loaded into memory. This has a similar effect as IndexWriter#setTermIndexInterval except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1.

    NOTE: you must call this before the term index is loaded. If the index is already loaded, an IllegalStateException is thrown. + @throws IllegalStateException if the term index has already been loaded into memory.
 final long size() 
    Returns the number of term/value pairs in the set.
 public SegmentTermEnum terms() 
    Returns an enumeration of all the Terms and TermInfos in the set.
 public SegmentTermEnum terms(Term term) throws IOException 
    Returns an enumeration of terms starting at or after the named term.