public class SimpleTextDocValuesConsumer extends DocValuesConsumer
FOR RECREATIONAL USE ONLY
| Modifier and Type | Field and Description |
|---|---|
protected IOContext |
ctx |
protected Directory |
dir |
protected BytesRefHash |
hash |
protected int |
maxDocId |
protected BytesRef |
scratch |
protected String |
segment |
protected DocValues.Type |
type |
spare| Constructor and Description |
|---|
SimpleTextDocValuesConsumer(String segment,
Directory dir,
IOContext ctx,
DocValues.Type type,
String segmentSuffix) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int docID,
IndexableField value)
Adds the given
IndexableField instance to this
DocValuesConsumer |
void |
finish(int docCount)
Called when the consumer of this API is done adding values.
|
protected BytesRef |
getHeader() |
protected DocValues.Type |
getType() |
int |
getValueSize()
Returns the value size this consumer accepts or -1 iff this
consumer is value size agnostic ie.
|
protected void |
writeDoc(IndexOutput output,
int docId,
BytesRef spare) |
merge, merge, mergeDocprotected BytesRef scratch
protected int maxDocId
protected final String segment
protected final Directory dir
protected final IOContext ctx
protected final DocValues.Type type
protected final BytesRefHash hash
public SimpleTextDocValuesConsumer(String segment, Directory dir, IOContext ctx, DocValues.Type type, String segmentSuffix)
public void add(int docID,
IndexableField value)
throws IOException
DocValuesConsumerIndexableField instance to this
DocValuesConsumeradd in class DocValuesConsumerdocID - the document ID to add the value for. The docID must always
increase or be 0 if it is the first call to this method.value - the value to addIOException - if an IOException occursprotected BytesRef getHeader()
public void finish(int docCount)
throws IOException
DocValuesConsumerfinish in class DocValuesConsumerdocCount - the total number of documents in this DocValuesConsumer.
Must be greater than or equal the last given docID to
DocValuesConsumer.add(int, IndexableField).IOExceptionprotected void writeDoc(IndexOutput output, int docId, BytesRef spare) throws IOException
IOExceptionprotected DocValues.Type getType()
getType in class DocValuesConsumerpublic int getValueSize()
DocValuesConsumerNOTE: the return value is undefined until the consumer has successfully consumed at least one value.
getValueSize in class DocValuesConsumerCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.