public abstract class DocValuesWriterBase extends PerDocConsumer
Modifier and Type | Field and Description |
---|---|
protected IOContext |
context
IOContext to use when writing files. |
static String |
DATA_EXTENSION
Filename extension for data files.
|
static String |
INDEX_EXTENSION
Filename extension for index files
|
protected String |
segmentName
Segment name to use when writing files.
|
Modifier | Constructor and Description |
---|---|
protected |
DocValuesWriterBase(PerDocWriteState state)
Creates
DocValuesWriterBase , using PackedInts.FAST . |
protected |
DocValuesWriterBase(PerDocWriteState state,
float acceptableOverheadRatio)
Creates
DocValuesWriterBase . |
Modifier and Type | Method and Description |
---|---|
DocValuesConsumer |
addValuesField(DocValues.Type valueType,
FieldInfo field)
Adds a new DocValuesField
|
void |
close() |
Comparator<BytesRef> |
getComparator()
Returns the comparator used to sort
BytesRef
values. |
protected abstract Directory |
getDirectory()
Returns the
Directory that files should be
written to. |
abort, canMerge, getDocValuesForMerge, getDocValuesType, merge
protected final String segmentName
public static final String INDEX_EXTENSION
public static final String DATA_EXTENSION
protected DocValuesWriterBase(PerDocWriteState state)
DocValuesWriterBase
, using PackedInts.FAST
.state
- The state to initiate a PerDocConsumer
instanceprotected DocValuesWriterBase(PerDocWriteState state, float acceptableOverheadRatio)
DocValuesWriterBase
.state
- The state to initiate a PerDocConsumer
instanceacceptableOverheadRatio
- how to trade space for speed. This option is only applicable for
docvalues of type DocValues.Type.BYTES_FIXED_SORTED
and
DocValues.Type.BYTES_VAR_SORTED
.PackedInts.getReader(org.apache.lucene.store.DataInput)
protected abstract Directory getDirectory() throws IOException
Directory
that files should be
written to.IOException
public void close() throws IOException
close
in interface Closeable
close
in class PerDocConsumer
IOException
public DocValuesConsumer addValuesField(DocValues.Type valueType, FieldInfo field) throws IOException
PerDocConsumer
addValuesField
in class PerDocConsumer
IOException
public Comparator<BytesRef> getComparator() throws IOException
BytesRef
values.IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.