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)
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.
|
float |
getValueForNormalization()
Compute the sub of squared weights of us applied to our subqueries.
|
void |
normalize(float norm,
float boost)
Apply the computed normalization factor to our subqueries
|
Scorer |
scorer(LeafReaderContext context)
Create the scorer used to score our associated DisjunctionMaxQuery
|
bulkScorer, getQuery
public DisjunctionMaxWeight(IndexSearcher searcher, boolean needsScores) 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 float getValueForNormalization() throws IOException
getValueForNormalization
in class Weight
IOException
public void normalize(float norm, float boost)
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 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-2016 Apache Software Foundation. All Rights Reserved.