| java.lang.Object org.apache.lucene.index.TermInfosReader
TermInfosReader | final class TermInfosReader (Code) | | This stores a monotonically increasing set of pairs in a
Directory. Pairs are accessed either by Term or by ordinal position the
set.
|
Method Summary | |
final void | close() | TermInfo | get(Term term) Returns the TermInfo for a Term in the set, or null. | final Term | get(int position) Returns the nth term in the set. | public int | getIndexDivisor() Returns the indexDivisor. | public int | getMaxSkipLevels() | final long | getPosition(Term term) Returns the position of a Term in the set or -1. | public int | getSkipInterval() | public void | setIndexDivisor(int indexDivisor) Sets the indexDivisor, which subsamples the number
of indexed terms 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) Returns an enumeration of terms starting at or after the named term. |
getMaxSkipLevels | public int getMaxSkipLevels()(Code) | | |
getPosition | final long getPosition(Term term) throws IOException(Code) | | Returns the position of a Term in the set or -1.
|
getSkipInterval | public int getSkipInterval()(Code) | | |
setIndexDivisor | public void setIndexDivisor(int indexDivisor) throws IllegalStateException(Code) | | 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.
|
size | final long size()(Code) | | Returns the number of term/value pairs in the set.
|
terms | public SegmentTermEnum terms()(Code) | | Returns an enumeration of all the Terms and TermInfos in the set.
|
|
|