public class Completion090PostingsFormat
extends org.apache.lucene.codecs.PostingsFormat
PostingsFormat
is basically a T-Sink for a default postings
format that is used to store postings on disk fitting the lucene APIs and
builds a suggest FST as an auxiliary data structure next to the actual
postings format. It uses the delegate postings format for simplicity to
handle all the merge operations. The auxiliary suggest FST data structure is
only loaded if a FieldsProducer is requested for reading, for merging it uses
the low memory delegate postings format.Modifier and Type | Class and Description |
---|---|
static class |
Completion090PostingsFormat.CompletionLookupProvider |
static class |
Completion090PostingsFormat.CompletionTerms |
static class |
Completion090PostingsFormat.LookupFactory |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CODEC_NAME |
static java.lang.String |
EXTENSION |
static int |
SUGGEST_CODEC_VERSION |
static int |
SUGGEST_VERSION_CURRENT |
Constructor and Description |
---|
Completion090PostingsFormat() |
Completion090PostingsFormat(org.apache.lucene.codecs.PostingsFormat delegatePostingsFormat,
Completion090PostingsFormat.CompletionLookupProvider provider) |
Modifier and Type | Method and Description |
---|---|
CompletionStats |
completionStats(org.apache.lucene.index.IndexReader indexReader,
java.lang.String... fieldNamePatterns)
Returns total in-heap bytes used by all suggesters.
|
org.elasticsearch.search.suggest.completion2x.Completion090PostingsFormat.CompletionFieldsConsumer |
fieldsConsumer(org.apache.lucene.index.SegmentWriteState state) |
org.elasticsearch.search.suggest.completion2x.Completion090PostingsFormat.CompletionFieldsProducer |
fieldsProducer(org.apache.lucene.index.SegmentReadState state) |
public static final java.lang.String CODEC_NAME
public static final int SUGGEST_CODEC_VERSION
public static final int SUGGEST_VERSION_CURRENT
public static final java.lang.String EXTENSION
public Completion090PostingsFormat(org.apache.lucene.codecs.PostingsFormat delegatePostingsFormat, Completion090PostingsFormat.CompletionLookupProvider provider)
public Completion090PostingsFormat()
public org.elasticsearch.search.suggest.completion2x.Completion090PostingsFormat.CompletionFieldsConsumer fieldsConsumer(org.apache.lucene.index.SegmentWriteState state) throws java.io.IOException
fieldsConsumer
in class org.apache.lucene.codecs.PostingsFormat
java.io.IOException
public org.elasticsearch.search.suggest.completion2x.Completion090PostingsFormat.CompletionFieldsProducer fieldsProducer(org.apache.lucene.index.SegmentReadState state) throws java.io.IOException
fieldsProducer
in class org.apache.lucene.codecs.PostingsFormat
java.io.IOException
public CompletionStats completionStats(org.apache.lucene.index.IndexReader indexReader, java.lang.String... fieldNamePatterns)
O(numIndexedFields)
.fieldNamePatterns
- if non-null, any completion field name matching any of these patterns will break out its in-heap bytes
separately in the returned CompletionStats