public abstract class ConstantScoreWeight extends Weight
Weight.DefaultBulkScorer, Weight.StartDISIWrapper
parentQuery
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, scorerSupplier
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCacheable
protected ConstantScoreWeight(Query query, float score)
public void extractTerms(Set<Term> terms)
Weight
Weight
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 Weight
protected final float score()
Weight
.public Explanation explain(LeafReaderContext context, int doc) throws IOException
Weight
explain
in class Weight
context
- 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-2021 Apache Software Foundation. All Rights Reserved.