public abstract class FilterWeight extends Weight
Weightand implements all abstract methods by calling the contained weight's method. Note that
FilterWeightdoes not override the non-abstract
Weight.bulkScorer(LeafReaderContext)method and subclasses of
FilterWeightmust provide their bulkScorer implementation if required.
|Modifier and Type||Field and Description|
|Modifier||Constructor and Description|
|Modifier and Type||Method and Description|
An explanation of the score computation for the named document.
Expert: adds all terms occurring in this query to the terms set.
bulkScorer, getQuery, scorerSupplier
protected final Weight in
protected FilterWeight(Weight weight)
protected FilterWeight(Query query, Weight weight)
weightwas not obtained via the
Query.createWeight(IndexSearcher, boolean, float)method of the
public boolean isCacheable(LeafReaderContext ctx)
trueif the object can be cached against a given leaf
public void extractTerms(Set<Term> terms)
Weightwas created with
needsScores == truethen this method will only extract terms which are used for scoring, otherwise it will extract all terms which are used for matching.
public Explanation explain(LeafReaderContext context, int doc) throws IOException
context- the readers context to create the
doc- the document's id relative to the given context's reader
IOException- if an
public Scorer scorer(LeafReaderContext context) throws IOException
Scorerwhich can iterate in order over all matching documents and assign them a score.
NOTE: null can be returned if no documents will be scored by this query.
NOTE: The returned
Scorer does not have
LeafReader.getLiveDocs() applied, they need to be checked on top.
LeafReaderContextfor which to return the
Scorerwhich scores documents in/out-of order.
IOException- if there is a low-level I/O error
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.