Class FixedGapTermsIndexWriter
java.lang.Object
org.apache.lucene.codecs.blockterms.TermsIndexWriterBase
org.apache.lucene.codecs.blockterms.FixedGapTermsIndexWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
Selects every Nth term as and index term, and hold term bytes (mostly) fully expanded in memory.
This terms index supports seeking by ord. See
VariableGapTermsIndexWriter
for a more
memory efficient terms index that does not support seeking by ord.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.lucene.codecs.blockterms.TermsIndexWriterBase
TermsIndexWriterBase.FieldWriter
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final String
static final int
private final List<FixedGapTermsIndexWriter.SimpleFieldWriter>
protected IndexOutput
private final int
(package private) static final String
Extension of terms index file(package private) static final int
(package private) static final int
-
Constructor Summary
Constructors -
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.private void
writeTrailer
(long dirStart)
-
Field Details
-
out
-
TERMS_INDEX_EXTENSION
Extension of terms index file- See Also:
-
CODEC_NAME
- See Also:
-
VERSION_START
static final int VERSION_START- See Also:
-
VERSION_CURRENT
static final int VERSION_CURRENT- See Also:
-
BLOCKSIZE
static final int BLOCKSIZE- See Also:
-
termIndexInterval
private final int termIndexInterval -
DEFAULT_TERM_INDEX_INTERVAL
public static final int DEFAULT_TERM_INDEX_INTERVAL- See Also:
-
fields
-
-
Constructor Details
-
FixedGapTermsIndexWriter
- Throws:
IOException
-
FixedGapTermsIndexWriter
- Throws:
IOException
-
-
Method Details
-
addField
- Specified by:
addField
in classTermsIndexWriterBase
-
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
-
writeTrailer
- Throws:
IOException
-