Package org.apache.lucene.search.suggest.document
Support for document suggestion
-
Class Summary Class Description Completion50PostingsFormat CompletionPostingsFormat
fororg.apache.lucene.codecs.lucene50.Lucene50PostingsFormat
.Completion84PostingsFormat CompletionAnalyzer Wraps anAnalyzer
to provide additional completion-only tuning (e.g.CompletionFieldsConsumer Weighted FSTs for any indexedSuggestField
is built onCompletionFieldsConsumer.write(Fields,NormsProducer)
.CompletionFieldsConsumer.CompletionMetaData CompletionFieldsConsumer.CompletionTermWriter CompletionFieldsProducer Completion index (.cmp) is opened and read at instantiation to read inSuggestField
numbers and their FST offsets in the Completion dictionary (.lkp).CompletionPostingsFormat APostingsFormat
which supports document suggestion based on indexedSuggestField
s.CompletionQuery AbstractQuery
that match documents containing terms with a specified prefix filtered byBitsProducer
.CompletionScorer Expert: Responsible for executing the query against an appropriate suggester and collecting the results via a collector.CompletionsTermsReader Holder for suggester and field-level info for a suggest fieldCompletionTerms WrappedTerms
used bySuggestField
andContextSuggestField
to access corresponding suggester and their attributesCompletionTokenStream AConcatenateGraphFilter
but we can set the payload and provide access to config options.CompletionWeight Expert: the Weight for CompletionQuery, used to score and explain these queries.ContextQuery ACompletionQuery
that matches documents specified by a wrappedCompletionQuery
supporting boosting and/or filtering by specified contexts.ContextQuery.ContextCompletionWeight ContextQuery.ContextMetaData Holder for context value meta dataContextSuggestField SuggestField
which additionally takes in a set of contexts.ContextSuggestField.PrefixTokenFilter TheContextSuggestField.PrefixTokenFilter
wraps aTokenStream
and adds a set prefixes ahead.FuzzyCompletionQuery ACompletionQuery
that match documents containing terms within an edit distance of the specified prefix.FuzzyCompletionQuery.FuzzyCompletionWeight NRTSuggester NRTSuggester executes Top N search on a weighted FST specified by aCompletionScorer
NRTSuggester.PayLoadProcessor Helper to encode/decode payload (surface + PAYLOAD_SEP + docID) outputNRTSuggester.ScoringPathComparator Compares partial completion paths usingCompletionScorer.score(float, float)
, breaks ties comparing path inputsNRTSuggesterBuilder Builder forNRTSuggester
NRTSuggesterBuilder.Entry PrefixCompletionQuery ACompletionQuery
which takes anAnalyzer
to analyze the prefix of the query term.RegexCompletionQuery ACompletionQuery
which takes a regular expression as the prefix of the query term.SuggestField Field that indexes a string value and a weight as a weighted completion against a named suggester.SuggestIndexSearcher Adds document suggest capabilities to IndexSearcher.SuggestScoreDocPriorityQueue Bounded priority queue forTopSuggestDocs.SuggestScoreDoc
s.TopSuggestDocs TopSuggestDocs.SuggestScoreDoc ScoreDoc
with an additional CharSequence keyTopSuggestDocsCollector Collector
that collects completion and score, along with document id -
Enum Summary Enum Description CompletionPostingsFormat.FSTLoadMode An enum that allows to control if suggester FSTs are loaded into memory or read off-heap