org.apache.lucene.codecs
Class BlockTreeTermsWriter
java.lang.Object
org.apache.lucene.codecs.FieldsConsumer
org.apache.lucene.codecs.BlockTreeTermsWriter
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- AppendingTermsWriter
public class BlockTreeTermsWriter
- extends FieldsConsumer
block-based terms index and dictionary writer.
Writes terms dict and index, block-encoding (column
stride) each term's metadata for each set of terms
between two index terms.
- See Also:
BlockTreeTermsReader
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MIN_BLOCK_SIZE
public static final int DEFAULT_MIN_BLOCK_SIZE
- See Also:
- Constant Field Values
DEFAULT_MAX_BLOCK_SIZE
public static final int DEFAULT_MAX_BLOCK_SIZE
- See Also:
- Constant Field Values
SAVE_DOT_FILES
public static final boolean SAVE_DOT_FILES
- See Also:
- Constant Field Values
TERMS_VERSION_START
public static final int TERMS_VERSION_START
- See Also:
- Constant Field Values
TERMS_VERSION_CURRENT
public static final int TERMS_VERSION_CURRENT
- See Also:
- Constant Field Values
TERMS_INDEX_VERSION_START
public static final int TERMS_INDEX_VERSION_START
- See Also:
- Constant Field Values
TERMS_INDEX_VERSION_CURRENT
public static final int TERMS_INDEX_VERSION_CURRENT
- See Also:
- Constant Field Values
BlockTreeTermsWriter
public BlockTreeTermsWriter(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
writeHeader
protected void writeHeader(IndexOutput out)
throws IOException
- Throws:
IOException
writeIndexHeader
protected void writeIndexHeader(IndexOutput out)
throws IOException
- Throws:
IOException
writeTrailer
protected void writeTrailer(IndexOutput out,
long dirStart)
throws IOException
- Throws:
IOException
writeIndexTrailer
protected void writeIndexTrailer(IndexOutput indexOut,
long dirStart)
throws IOException
- Throws:
IOException
addField
public TermsConsumer addField(FieldInfo field)
throws IOException
- Description copied from class:
FieldsConsumer
- Add a new field
- Specified by:
addField
in class FieldsConsumer
- Throws:
IOException
close
public void close()
throws IOException
- Description copied from class:
FieldsConsumer
- Called when we are done adding everything.
- Specified by:
close
in interface Closeable
- Specified by:
close
in class FieldsConsumer
- Throws:
IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.