public abstract class CompletionPostingsFormat extends PostingsFormat
A PostingsFormat which supports document suggestion based on
indexed SuggestFields.
Document suggestion is based on an weighted FST which map analyzed
terms of a SuggestField to its surface form and document id.
Files:
The .lkp file contains an FST for each suggest field
CodecHeaderFST<Long, BytesRef>CodecFooterNotes:
CodecHeader storing the version information
for the Completion implementation.The .cmp file contains an index into the completion dictionary, so that it can be accessed randomly.
CodecHeaderUint32Uint32Uint64Uint64Uint64ByteCodecFooterNotes:
CodecHeader storing the version information
for the Completion implementation.FieldInfos. (.fnm)| Modifier and Type | Class and Description |
|---|---|
static class |
CompletionPostingsFormat.FSTLoadMode
An enum that allows to control if suggester FSTs are loaded into memory or read off-heap
|
EMPTY| Constructor and Description |
|---|
CompletionPostingsFormat(String name)
Used only by core Lucene at read-time via Service Provider instantiation
|
CompletionPostingsFormat(String name,
CompletionPostingsFormat.FSTLoadMode fstLoadMode)
Creates a
CompletionPostingsFormat that will
use the provided fstLoadMode to determine
if the completion FST should be loaded on or off heap. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract PostingsFormat |
delegatePostingsFormat()
Concrete implementation should specify the delegating postings format
|
FieldsConsumer |
fieldsConsumer(SegmentWriteState state) |
FieldsProducer |
fieldsProducer(SegmentReadState state) |
availablePostingsFormats, forName, getName, reloadPostingsFormats, toStringpublic CompletionPostingsFormat(String name)
public CompletionPostingsFormat(String name, CompletionPostingsFormat.FSTLoadMode fstLoadMode)
CompletionPostingsFormat that will
use the provided fstLoadMode to determine
if the completion FST should be loaded on or off heap.protected abstract PostingsFormat delegatePostingsFormat()
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException
fieldsConsumer in class PostingsFormatIOExceptionpublic FieldsProducer fieldsProducer(SegmentReadState state) throws IOException
fieldsProducer in class PostingsFormatIOExceptionCopyright © 2000-2024 Apache Software Foundation. All Rights Reserved.