public class BlockTreeTermsWriter extends FieldsConsumer
Writes terms dict and index, block-encoding (column stride) each term's metadata for each set of terms between two index terms.
BlockTreeTermsReader| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_BLOCK_SIZE |
static int |
DEFAULT_MIN_BLOCK_SIZE |
static boolean |
SAVE_DOT_FILES |
static int |
TERMS_INDEX_VERSION_CURRENT |
static int |
TERMS_INDEX_VERSION_START |
static int |
TERMS_VERSION_CURRENT |
static int |
TERMS_VERSION_START |
| Constructor and Description |
|---|
BlockTreeTermsWriter(SegmentWriteState state,
PostingsWriterBase postingsWriter,
int minItemsInBlock,
int maxItemsInBlock)
Create a new writer.
|
| Modifier and Type | Method and Description |
|---|---|
TermsConsumer |
addField(FieldInfo field)
Add a new field
|
void |
close()
Called when we are done adding everything.
|
protected void |
writeHeader(IndexOutput out) |
protected void |
writeIndexHeader(IndexOutput out) |
protected void |
writeIndexTrailer(IndexOutput indexOut,
long dirStart) |
protected void |
writeTrailer(IndexOutput out,
long dirStart) |
mergepublic static final int DEFAULT_MIN_BLOCK_SIZE
public static final int DEFAULT_MAX_BLOCK_SIZE
public static final boolean SAVE_DOT_FILES
public static final int TERMS_VERSION_START
public static final int TERMS_VERSION_CURRENT
public static final int TERMS_INDEX_VERSION_START
public static final int TERMS_INDEX_VERSION_CURRENT
public BlockTreeTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter, int minItemsInBlock, int maxItemsInBlock) throws IOException
IOExceptionprotected void writeHeader(IndexOutput out) throws IOException
IOExceptionprotected void writeIndexHeader(IndexOutput out) throws IOException
IOExceptionprotected void writeTrailer(IndexOutput out, long dirStart) throws IOException
IOExceptionprotected void writeIndexTrailer(IndexOutput indexOut, long dirStart) throws IOException
IOExceptionpublic TermsConsumer addField(FieldInfo field) throws IOException
FieldsConsumeraddField in class FieldsConsumerIOExceptionpublic void close()
throws IOException
FieldsConsumerclose in interface Closeableclose in class FieldsConsumerIOExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.