Module org.apache.lucene.suggest
Class FuzzyCompletionQuery.FuzzyCompletionWeight
java.lang.Object
org.apache.lucene.search.Weight
org.apache.lucene.search.suggest.document.CompletionWeight
org.apache.lucene.search.suggest.document.FuzzyCompletionQuery.FuzzyCompletionWeight
- All Implemented Interfaces:
SegmentCacheable
- Enclosing class:
FuzzyCompletionQuery
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Weight
Weight.DefaultBulkScorer -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intFields inherited from class org.apache.lucene.search.Weight
parentQuery -
Constructor Summary
ConstructorsConstructorDescriptionFuzzyCompletionWeight(CompletionQuery query, Automaton automaton, Set<IntsRef> refs) -
Method Summary
Modifier and TypeMethodDescriptionprotected floatboost()Returns the boost of the partial path set byCompletionWeight.setNextMatch(IntsRef)protected voidsetNextMatch(IntsRef pathPrefix) Set for every partial path in the index that matched the query automaton.Methods inherited from class org.apache.lucene.search.suggest.document.CompletionWeight
bulkScorer, context, explain, getAutomaton, isCacheable, scorerMethods inherited from class org.apache.lucene.search.Weight
count, getQuery, matches, scorerSupplier
-
Field Details
-
refs
-
currentBoost
int currentBoost
-
-
Constructor Details
-
FuzzyCompletionWeight
public FuzzyCompletionWeight(CompletionQuery query, Automaton automaton, Set<IntsRef> refs) throws IOException - Throws:
IOException
-
-
Method Details
-
setNextMatch
Description copied from class:CompletionWeightSet for every partial path in the index that matched the query automaton.Subclasses should override
CompletionWeight.boost()andCompletionWeight.context()to return an appropriate value with respect to the current pathPrefix.- Overrides:
setNextMatchin classCompletionWeight- Parameters:
pathPrefix- the prefix of a matched path
-
boost
protected float boost()Description copied from class:CompletionWeightReturns the boost of the partial path set byCompletionWeight.setNextMatch(IntsRef)- Overrides:
boostin classCompletionWeight- Returns:
- suggestion query-time boost
-