public final class FunctionScoreQuery extends Query
Constructor and Description |
---|
FunctionScoreQuery(Query in,
DoubleValuesSource source)
Create a new FunctionScoreQuery
|
Modifier and Type | Method and Description |
---|---|
static FunctionScoreQuery |
boostByQuery(Query in,
Query boostMatch,
float boostValue)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by
a boost factor if the document being scored also matches a separate boosting query.
|
static FunctionScoreQuery |
boostByValue(Query in,
DoubleValuesSource boost)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by
the value of a DoubleValuesSource.
|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
o) |
DoubleValuesSource |
getSource() |
Query |
getWrappedQuery() |
int |
hashCode() |
Query |
rewrite(IndexReader reader) |
|
field) |
void |
visit(QueryVisitor visitor) |
classHash, sameClassAs, toString
public FunctionScoreQuery(Query in, DoubleValuesSource source)
in
- the query to wrapsource
- a source of scorespublic Query getWrappedQuery()
public DoubleValuesSource getSource()
public static FunctionScoreQuery boostByValue(Query in, DoubleValuesSource boost)
in
- the query to boostboost
- a DoubleValuesSource
containing the boost valuespublic static FunctionScoreQuery boostByQuery(Query in, Query boostMatch, float boostValue)
in
- the query to boostboostMatch
- the boosting queryboostValue
- the amount to boost documents which match the boosting querypublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws
createWeight
in class Query
public Query rewrite(IndexReader reader) throws
public void visit(QueryVisitor visitor)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.