Class CompletionScorer
java.lang.Object
org.apache.lucene.search.BulkScorer
org.apache.lucene.search.suggest.document.CompletionScorer
Expert: Responsible for executing the query against an appropriate suggester and collecting the
results via a collector.
score(LeafCollector, Bits, int, int) is called for each leaf reader.
accept(int,Bits) and score(float, float) is called for every matched
completion (i.e. document)
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CompletionWeightweight that created this scorer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompletionScorer(CompletionWeight weight, NRTSuggester suggester, LeafReader reader, Bits filterDocs, boolean filtered, Automaton automaton) Creates a scorer for a field-specificsuggesterscoped byacceptDocs -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns true if a document withdocIDis accepted, false if the docID maps to a deleted document or has been filtered outlongcost()floatscore(float weight, float boost) Returns the score for a matched completion based on the query time boost and the index time weight.intscore(LeafCollector collector, Bits acceptDocs, int min, int max)
-
Field Details
-
weight
weight that created this scorer
-
-
Constructor Details
-
CompletionScorer
protected CompletionScorer(CompletionWeight weight, NRTSuggester suggester, LeafReader reader, Bits filterDocs, boolean filtered, Automaton automaton) throws IOException Creates a scorer for a field-specificsuggesterscoped byacceptDocs- Throws:
IOException
-
-
Method Details
-
score
- Specified by:
scorein classBulkScorer- Throws:
IOException
-
cost
public long cost()- Specified by:
costin classBulkScorer
-
accept
Returns true if a document withdocIDis accepted, false if the docID maps to a deleted document or has been filtered out- Parameters:
liveDocs- theBitsrepresenting live docs, or possiblynullif all docs are live
-
score
public float score(float weight, float boost) Returns the score for a matched completion based on the query time boost and the index time weight.
-