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 ArrayList<Weight> |
weights
The Weights for our subqueries, in 1-1 correspondence with disjuncts
|
parentQuery
Constructor and Description |
---|
DisjunctionMaxWeight(IndexSearcher searcher,
ScoreMode scoreMode,
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(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, scorerSupplier
public DisjunctionMaxWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
IOException
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
public Matches matches(LeafReaderContext context, int doc) throws IOException
Weight
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
matches
in class Weight
context
- the reader's context to create the Matches
fordoc
- the document's id relative to the given context's readerIOException
public Scorer scorer(LeafReaderContext context) throws IOException
scorer
in class Weight
context
- the LeafReaderContext
for which to return the Scorer
.Scorer
which scores documents in/out-of order.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 IOException
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-2024 Apache Software Foundation. All Rights Reserved.