Class VariableGapTermsIndexWriter
java.lang.Object
org.apache.lucene.codecs.blockterms.TermsIndexWriterBase
org.apache.lucene.codecs.blockterms.VariableGapTermsIndexWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
Selects index terms according to provided pluggable
VariableGapTermsIndexWriter.IndexTermSelector
, and stores them in
a prefix trie that's loaded entirely in RAM stored as an FST. This terms index only supports
unsigned byte term sort order (unicode codepoint order when the bytes are UTF8).- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Sets an index term when docFreq >= docFreqThresh, or every interval terms.static final class
Same policy asFixedGapTermsIndexWriter
static class
Hook for selecting which terms should be placed in the terms index.Nested classes/interfaces inherited from class org.apache.lucene.codecs.blockterms.TermsIndexWriterBase
TermsIndexWriterBase.FieldWriter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVariableGapTermsIndexWriter
(SegmentWriteState state, VariableGapTermsIndexWriter.IndexTermSelector policy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected int
indexedTermPrefixLength
(BytesRef priorTerm, BytesRef indexedTerm) NOTE: if your codec does not sort in unicode code point order, you must override this method, to simply return indexedTerm.length.
-
Field Details
-
out
-
-
Constructor Details
-
VariableGapTermsIndexWriter
public VariableGapTermsIndexWriter(SegmentWriteState state, VariableGapTermsIndexWriter.IndexTermSelector policy) throws IOException - Throws:
IOException
-
-
Method Details
-
addField
public TermsIndexWriterBase.FieldWriter addField(FieldInfo field, long termsFilePointer) throws IOException - Specified by:
addField
in classTermsIndexWriterBase
- Throws:
IOException
-
indexedTermPrefixLength
NOTE: if your codec does not sort in unicode code point order, you must override this method, to simply return indexedTerm.length. -
close
- Throws:
IOException
-