gate.creole.annic.apache.lucene.index
Class TermInfosWriter
java.lang.Object
gate.creole.annic.apache.lucene.index.TermInfosWriter
final class TermInfosWriter
- extends Object
This stores a monotonically increasing set of pairs in a
Directory. A TermInfos can be written once, in order.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORMAT
public static final int FORMAT
- The file format version, a negative number.
- See Also:
- Constant Field Values
fieldInfos
private FieldInfos fieldInfos
output
private OutputStream output
lastTerm
private Term lastTerm
lastTi
private TermInfo lastTi
size
private long size
indexInterval
int indexInterval
- Expert: The fraction of terms in the "dictionary" which should be stored
in RAM. Smaller values use more memory, but make searching slightly
faster, while larger values use less memory and make searching slightly
slower. Searching is typically not dominated by dictionary lookup, so
tweaking this is rarely useful.
skipInterval
int skipInterval
- Expert: The fraction of
TermDocs entries stored in skip tables,
used to accellerate TermDocs.skipTo(int). Larger values result in
smaller indexes, greater acceleration, but fewer accelerable cases, while
smaller values result in bigger indexes, less acceleration and more
accelerable cases. More detailed experiments would be useful here.
lastIndexPointer
private long lastIndexPointer
isIndex
private boolean isIndex
other
private TermInfosWriter other
TermInfosWriter
TermInfosWriter(Directory directory,
String segment,
FieldInfos fis)
throws IOException
- Throws:
IOException
TermInfosWriter
private TermInfosWriter(Directory directory,
String segment,
FieldInfos fis,
boolean isIndex)
throws IOException
- Throws:
IOException
initialize
private void initialize(Directory directory,
String segment,
FieldInfos fis,
boolean isi)
throws IOException
- Throws:
IOException
add
final void add(Term term,
TermInfo ti)
throws IOException
- Adds a new pair to the set.
Term must be lexicographically greater than all previous Terms added.
TermInfo pointers must be positive and greater than all previous.
- Throws:
IOException
writeTerm
private final void writeTerm(Term term)
throws IOException
- Throws:
IOException
close
final void close()
throws IOException
- Called to complete TermInfos creation.
- Throws:
IOException