public abstract class ConstantScoreWeight extends Weight
Weight.DefaultBulkScorer, Weight.StartDISIWrapperparentQuery| Modifier | Constructor and Description |
|---|---|
protected |
ConstantScoreWeight(Query query,
float score) |
| Modifier and Type | Method and Description |
|---|---|
Explanation |
explain(LeafReaderContext context,
int doc)
An explanation of the score computation for the named document.
|
void |
extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
protected float |
score()
Return the score produced by this
Weight. |
bulkScorer, getQuery, matches, scorer, scorerSupplierclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCacheableprotected ConstantScoreWeight(Query query, float score)
public void extractTerms(Set<Term> terms)
WeightWeight was created with needsScores == true then this
method will only extract terms which are used for scoring, otherwise it
will extract all terms which are used for matching.extractTerms in class Weightprotected final float score()
Weight.public Explanation explain(LeafReaderContext context, int doc) throws IOException
Weightexplain in class Weightcontext - the readers context to create the Explanation for.doc - the document's id relative to the given context's readerIOException - if an IOException occursCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.