public class MaxScoreOrQuery extends OrQuery
OrQuery
, but the score for each result will be the max score from the clauses (instead of the sum).Query.LogicalOperator, Query.Operator
Modifier and Type | Field and Description |
---|---|
private static float |
__DEFAULT_TIE_BREAKER |
private float |
_tieBreaker |
Constructor and Description |
---|
MaxScoreOrQuery(Collection<Query> queries)
Build a MaxScoreOrQuery object with default tiebreaker.
|
MaxScoreOrQuery(float tieBreaker,
Collection<Query> queries)
Build a MaxScoreOrQuery object.
|
MaxScoreOrQuery(float tieBreaker,
Query... queries)
Build a MaxScoreOrQuery object.
|
MaxScoreOrQuery(Query... queries)
Build a MaxScoreOrQuery object with default tiebreaker.
|
Modifier and Type | Method and Description |
---|---|
protected String |
_tagNameForToString()
The tag name for
OrQuery.toString(int) debug method. |
String |
build()
Build the solr query string representing the Query object.
|
boolean |
equals(Object obj) |
int |
hashCode() |
collector, getQueries, toString
private static final float __DEFAULT_TIE_BREAKER
private float _tieBreaker
public MaxScoreOrQuery(Query... queries)
queries
- the queries.public MaxScoreOrQuery(Collection<Query> queries)
queries
- the queries as a Collection.public MaxScoreOrQuery(float tieBreaker, Query... queries)
tieBreaker
- The tiebreakerqueries
- the queries.public MaxScoreOrQuery(float tieBreaker, Collection<Query> queries)
tieBreaker
- The tiebreakerqueries
- the queries as a Collection.public String build() throws QuerySyntaxException
Query
build
in interface Query
build
in class OrQuery
QuerySyntaxException
- if the query can't be built because of a syntax error.protected String _tagNameForToString()
OrQuery
OrQuery.toString(int)
debug method._tagNameForToString
in class OrQuery
OrQuery.toString(int)
debug method.