Class OrdsBlockTreeTermsWriter
java.lang.Object
org.apache.lucene.codecs.FieldsConsumer
org.apache.lucene.codecs.blocktreeords.OrdsBlockTreeTermsWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
This is just like
Lucene90BlockTreeTermsWriter
, except it also stores a version per term,
and adds a method to its TermsEnum implementation to seekExact only if the version is >= the
specified version. The version is added to the terms index to avoid seeking if no term in the
block has a high enough version. The term blocks file is .tiv and the terms index extension is
.tipv.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Suggested default value for themaxItemsInBlock
parameter toOrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.static final int
Suggested default value for theminItemsInBlock
parameter toOrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.static final int
Current terms format.static final int
Initial terms format. -
Constructor Summary
ConstructorDescriptionOrdsBlockTreeTermsWriter
(SegmentWriteState state, PostingsWriterBase postingsWriter, int minItemsInBlock, int maxItemsInBlock) Create a new writer. -
Method Summary
Methods inherited from class org.apache.lucene.codecs.FieldsConsumer
merge
-
Field Details
-
DEFAULT_MIN_BLOCK_SIZE
public static final int DEFAULT_MIN_BLOCK_SIZESuggested default value for theminItemsInBlock
parameter toOrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.- See Also:
-
DEFAULT_MAX_BLOCK_SIZE
public static final int DEFAULT_MAX_BLOCK_SIZESuggested default value for themaxItemsInBlock
parameter toOrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.- See Also:
-
VERSION_START
public static final int VERSION_STARTInitial terms format.- See Also:
-
VERSION_CURRENT
public static final int VERSION_CURRENTCurrent terms format.- See Also:
-
-
Constructor Details
-
OrdsBlockTreeTermsWriter
public OrdsBlockTreeTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter, int minItemsInBlock, int maxItemsInBlock) throws IOException Create a new writer. The number of items (terms or sub-blocks) per block will aim to be between minItemsPerBlock and maxItemsPerBlock, though in some cases the blocks may be smaller than the min.- Throws:
IOException
-
-
Method Details
-
write
- Specified by:
write
in classFieldsConsumer
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classFieldsConsumer
- Throws:
IOException
-