final class CompletionFieldsConsumer extends FieldsConsumer
Weighted FSTs for any indexed SuggestField is built on write(Fields,NormsProducer).
A weighted FST maps the analyzed forms of a field to its
surface form and document id. FSTs are stored in the CompletionDictionary (.lkp).
The file offsets of a field's FST are stored in the CompletionIndex (.cmp)
along with the field's internal number FieldInfo.number on close().
| Modifier and Type | Class and Description |
|---|---|
private static class |
CompletionFieldsConsumer.CompletionMetaData |
private static class |
CompletionFieldsConsumer.CompletionTermWriter |
| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private FieldsConsumer |
delegateFieldsConsumer |
private java.lang.String |
delegatePostingsFormatName |
private IndexOutput |
dictOut |
private java.util.Map<java.lang.String,CompletionFieldsConsumer.CompletionMetaData> |
seenFields |
private SegmentWriteState |
state |
| Constructor and Description |
|---|
CompletionFieldsConsumer(PostingsFormat delegatePostingsFormat,
SegmentWriteState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
write(Fields fields,
NormsProducer norms)
Write all fields, terms and postings.
|
mergeprivate final java.lang.String delegatePostingsFormatName
private final java.util.Map<java.lang.String,CompletionFieldsConsumer.CompletionMetaData> seenFields
private final SegmentWriteState state
private IndexOutput dictOut
private FieldsConsumer delegateFieldsConsumer
private boolean closed
CompletionFieldsConsumer(PostingsFormat delegatePostingsFormat, SegmentWriteState state) throws java.io.IOException
java.io.IOExceptionpublic void write(Fields fields, NormsProducer norms) throws java.io.IOException
FieldsConsumerNotes:
write in class FieldsConsumerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class FieldsConsumerjava.io.IOException