public final class OrdsBlockTreeTermsWriter extends FieldsConsumer
BlockTreeTermsWriter
, 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.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_BLOCK_SIZE
Suggested default value for the
maxItemsInBlock parameter to OrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int) . |
static int |
DEFAULT_MIN_BLOCK_SIZE
Suggested default value for the
minItemsInBlock parameter to OrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int) . |
static int |
VERSION_CURRENT
Current terms format.
|
static int |
VERSION_START
Initial terms format.
|
Constructor and Description |
---|
OrdsBlockTreeTermsWriter(SegmentWriteState state,
PostingsWriterBase postingsWriter,
int minItemsInBlock,
int maxItemsInBlock)
Create a new writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(Fields fields)
Write all fields, terms and postings.
|
merge
public static final int DEFAULT_MIN_BLOCK_SIZE
minItemsInBlock
parameter to OrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.public static final int DEFAULT_MAX_BLOCK_SIZE
maxItemsInBlock
parameter to OrdsBlockTreeTermsWriter(SegmentWriteState,PostingsWriterBase,int,int)
.public static final int VERSION_START
public static final int VERSION_CURRENT
public OrdsBlockTreeTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter, int minItemsInBlock, int maxItemsInBlock) throws IOException
IOException
public void write(Fields fields) throws IOException
FieldsConsumer
Notes:
write
in class FieldsConsumer
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FieldsConsumer
IOException