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
private static class FuzzyCompletionQuery.FuzzyCompletionWeight extends CompletionWeight
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.Weight
Weight.DefaultBulkScorer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
currentBoost
private java.util.Set<IntsRef>
refs
-
Fields inherited from class org.apache.lucene.search.Weight
parentQuery
-
-
Constructor Summary
Constructors Constructor Description FuzzyCompletionWeight(CompletionQuery query, Automaton automaton, java.util.Set<IntsRef> refs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float
boost()
Returns the boost of the partial path set byCompletionWeight.setNextMatch(IntsRef)
protected void
setNextMatch(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, extractTerms, getAutomaton, isCacheable, scorer
-
Methods inherited from class org.apache.lucene.search.Weight
getQuery, matches, scorerSupplier
-
-
-
-
Field Detail
-
refs
private final java.util.Set<IntsRef> refs
-
currentBoost
int currentBoost
-
-
Constructor Detail
-
FuzzyCompletionWeight
public FuzzyCompletionWeight(CompletionQuery query, Automaton automaton, java.util.Set<IntsRef> refs) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
setNextMatch
protected void setNextMatch(IntsRef pathPrefix)
Description copied from class:CompletionWeight
Set for every partial path in the index that matched the query automaton. Subclasses should overrideCompletionWeight.boost()
andCompletionWeight.context()
to return an appropriate value with respect to the current pathPrefix.- Overrides:
setNextMatch
in classCompletionWeight
- Parameters:
pathPrefix
- the prefix of a matched path
-
boost
protected float boost()
Description copied from class:CompletionWeight
Returns the boost of the partial path set byCompletionWeight.setNextMatch(IntsRef)
- Overrides:
boost
in classCompletionWeight
- Returns:
- suggestion query-time boost
-
-