protected class DisjunctionMaxQuery.DisjunctionMaxWeight extends Weight
NOTE: this API and implementation is subject to change suddenly in the next release.
Weight.DefaultBulkScorer| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<Weight> |
weights
The Weights for our subqueries, in 1-1 correspondence with disjuncts
|
parentQuery| Constructor and Description |
|---|
DisjunctionMaxWeight(IndexSearcher searcher,
boolean needsScores,
float boost)
Construct the Weight for this Query searched by searcher.
|
| Modifier and Type | Method and Description |
|---|---|
Explanation |
explain(LeafReaderContext context,
int doc)
Explain the score we computed for doc
|
void |
extractTerms(java.util.Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
boolean |
isCacheable(LeafReaderContext ctx) |
Matches |
matches(LeafReaderContext context,
int doc)
Returns
Matches for a specific document, or null if the document
does not match the parent query
A query match that contains no position information (for example, a Point or
DocValues query) will return MatchesUtils.MATCH_WITH_NO_TERMS |
Scorer |
scorer(LeafReaderContext context)
Create the scorer used to score our associated DisjunctionMaxQuery
|
bulkScorer, getQuery, scorerSupplierprotected final java.util.ArrayList<Weight> weights
public DisjunctionMaxWeight(IndexSearcher searcher, boolean needsScores, float boost) throws java.io.IOException
java.io.IOExceptionpublic void extractTerms(java.util.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 Weightpublic Matches matches(LeafReaderContext context, int doc) throws java.io.IOException
WeightMatches for a specific document, or null if the document
does not match the parent query
A query match that contains no position information (for example, a Point or
DocValues query) will return MatchesUtils.MATCH_WITH_NO_TERMSpublic Scorer scorer(LeafReaderContext context) throws java.io.IOException
scorer in class Weightcontext - the LeafReaderContext for which to return the Scorer.Scorer which scores documents in/out-of order.java.io.IOException - if there is a low-level I/O errorpublic boolean isCacheable(LeafReaderContext ctx)
true if the object can be cached against a given leafpublic Explanation explain(LeafReaderContext context, int doc) throws java.io.IOException
explain in class Weightcontext - the readers context to create the Explanation for.doc - the document's id relative to the given context's readerjava.io.IOException - if an IOException occursCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.