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 java.lang.String |
codecName |
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(java.lang.String codecName,
PostingsFormat delegatePostingsFormat,
SegmentWriteState state) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(Fields fields,
NormsProducer norms)
Write all fields, terms and postings.
|
merge
private 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 final java.lang.String codecName
private boolean closed
CompletionFieldsConsumer(java.lang.String codecName, PostingsFormat delegatePostingsFormat, SegmentWriteState state) throws java.io.IOException
java.io.IOException
public void write(Fields fields, NormsProducer norms) throws java.io.IOException
FieldsConsumer
Notes:
write
in class FieldsConsumer
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class FieldsConsumer
java.io.IOException