public class CompletionWeight
extends Weight
setNextMatch(IntsRef),
boost() and context()
to calculate the boost and extract the context of
a matched path prefix.| Constructor and Description |
|---|
CompletionWeight(CompletionQuery query,
Automaton automaton)
Creates a weight for
query with an automaton,
using the reader for index stats |
| Modifier and Type | Method and Description |
|---|---|
protected float |
boost()
Returns the boost of the partial path set by
setNextMatch(IntsRef) |
BulkScorer |
bulkScorer(LeafReaderContext context) |
protected java.lang.CharSequence |
context()
Returns the context of the partial path set by
setNextMatch(IntsRef) |
Explanation |
explain(LeafReaderContext context,
int doc) |
void |
extractTerms(java.util.Set<Term> terms) |
Automaton |
getAutomaton()
Returns the automaton specified
by the
CompletionQuery |
boolean |
isCacheable(LeafReaderContext ctx)
This object can be cached
|
Scorer |
scorer(LeafReaderContext context) |
protected void |
setNextMatch(IntsRef pathPrefix)
Set for every partial path in the index that matched the query
automaton.
|
public CompletionWeight(CompletionQuery query, Automaton automaton) throws java.io.IOException
query with an automaton,
using the reader for index statsjava.io.IOExceptionpublic Automaton getAutomaton()
CompletionQuerypublic BulkScorer bulkScorer(LeafReaderContext context)
throws java.io.IOException
java.io.IOExceptionprotected void setNextMatch(IntsRef pathPrefix)
boost() and context()
to return an appropriate value with respect to the current pathPrefix.pathPrefix - the prefix of a matched pathprotected float boost()
setNextMatch(IntsRef)protected java.lang.CharSequence context()
setNextMatch(IntsRef)public Scorer scorer(LeafReaderContext context)
throws java.io.IOException
java.io.IOExceptionpublic boolean isCacheable(LeafReaderContext ctx)
org.apache.lucene.search.SegmentCacheable#isCacheable(LeafReaderContext)public void extractTerms(java.util.Set<Term> terms)
public Explanation explain(LeafReaderContext context,
int doc)
throws java.io.IOException
java.io.IOExceptionData In Motion GmbH all rights reserved