public abstract class PerDocConsumer extends Object implements Closeable
The PerDocConsumer
API is accessible through the
PostingsFormat
- API providing per field consumers and producers for inverted
data (terms, postings) as well as per-document data.
Modifier | Constructor and Description |
---|---|
protected |
PerDocConsumer()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Called during indexing if the indexing session is aborted due to a unrecoverable exception.
|
abstract DocValuesConsumer |
addValuesField(DocValues.Type type,
FieldInfo field)
Adds a new DocValuesField
|
protected boolean |
canMerge(FieldInfo info)
Returns
true iff the given field can be merged ie. |
abstract void |
close() |
protected DocValues |
getDocValuesForMerge(AtomicReader reader,
FieldInfo info)
|
protected DocValues.Type |
getDocValuesType(FieldInfo info)
|
void |
merge(MergeState mergeState)
Consumes and merges the given
PerDocProducer producer
into this consumers format. |
protected PerDocConsumer()
public abstract DocValuesConsumer addValuesField(DocValues.Type type, FieldInfo field) throws IOException
IOException
public void merge(MergeState mergeState) throws IOException
PerDocProducer
producer
into this consumers format.IOException
protected DocValues getDocValuesForMerge(AtomicReader reader, FieldInfo info) throws IOException
DocValues
instance for merging from the given reader for the given
FieldInfo
. This method is used for merging and uses
AtomicReader.docValues(String)
by default.
To enable DocValues
merging for different DocValues
than
the default override this method accordingly.
IOException
protected boolean canMerge(FieldInfo info)
true
iff the given field can be merged ie. has DocValues
.
By default this method uses FieldInfo.hasDocValues()
.
To enable DocValues
merging for different DocValues
than
the default override this method accordingly.
protected DocValues.Type getDocValuesType(FieldInfo info)
DocValues
DocValues.Type
for the given FieldInfo
.
By default this method uses FieldInfo.getDocValuesType()
.
To enable DocValues
merging for different DocValues
than
the default override this method accordingly.
public abstract void abort()
public abstract void close() throws IOException
close
in interface Closeable
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.