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,
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(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
|
boolean |
isCacheable(LeafReaderContext ctx) |
Scorer |
scorer(LeafReaderContext context)
Create the scorer used to score our associated DisjunctionMaxQuery
|
bulkScorer, getQuery, scorerSupplier
public DisjunctionMaxWeight(IndexSearcher searcher, boolean needsScores, 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 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-2018 Apache Software Foundation. All Rights Reserved.