private class PerFieldPostingsFormat.FieldsWriter extends FieldsConsumer
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<java.io.Closeable> |
toClose |
(package private) SegmentWriteState |
writeState |
| Constructor and Description |
|---|
FieldsWriter(SegmentWriteState writeState) |
| Modifier and Type | Method and Description |
|---|---|
private java.util.Map<PostingsFormat,PerFieldPostingsFormat.FieldsGroup> |
buildFieldsGroupMapping(java.lang.Iterable<java.lang.String> indexedFieldNames) |
void |
close() |
void |
merge(MergeState mergeState,
NormsProducer norms)
Merges in the fields from the readers in
mergeState. |
void |
write(Fields fields,
NormsProducer norms)
Write all fields, terms and postings.
|
final SegmentWriteState writeState
final java.util.List<java.io.Closeable> toClose
public FieldsWriter(SegmentWriteState writeState)
public void write(Fields fields, NormsProducer norms) throws java.io.IOException
FieldsConsumerNotes:
write in class FieldsConsumerjava.io.IOExceptionpublic void merge(MergeState mergeState, NormsProducer norms) throws java.io.IOException
FieldsConsumermergeState. The default implementation skips
and maps around deleted documents, and calls FieldsConsumer.write(Fields,NormsProducer).
Implementations can override this method for more sophisticated
merging (bulk-byte copying, etc).merge in class FieldsConsumerjava.io.IOExceptionprivate java.util.Map<PostingsFormat,PerFieldPostingsFormat.FieldsGroup> buildFieldsGroupMapping(java.lang.Iterable<java.lang.String> indexedFieldNames)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class FieldsConsumerjava.io.IOException