Package org.ametys.cms.search.query
Class MaxScoreOrQuery
java.lang.Object
org.ametys.cms.search.query.OrQuery
org.ametys.cms.search.query.MaxScoreOrQuery
- All Implemented Interfaces:
Query
Same as
OrQuery
, but the score for each result will be the max score from the clauses (instead of the sum).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMaxScoreOrQuery
(float tieBreaker, Collection<Query> queries) Build a MaxScoreOrQuery object.MaxScoreOrQuery
(float tieBreaker, Query... queries) Build a MaxScoreOrQuery object.MaxScoreOrQuery
(Collection<Query> queries) Build a MaxScoreOrQuery object with default tiebreaker.MaxScoreOrQuery
(Query... queries) Build a MaxScoreOrQuery object with default tiebreaker. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
The tag name forOrQuery.toString(int)
debug method.build()
Build the solr query string representing the Query object.boolean
int
hashCode()
Methods inherited from class org.ametys.cms.search.query.OrQuery
collector, getQueries, toString
-
Constructor Details
-
MaxScoreOrQuery
Build a MaxScoreOrQuery object with default tiebreaker.- Parameters:
queries
- the queries.
-
MaxScoreOrQuery
Build a MaxScoreOrQuery object with default tiebreaker.- Parameters:
queries
- the queries as a Collection.
-
MaxScoreOrQuery
Build a MaxScoreOrQuery object.- Parameters:
tieBreaker
- The tiebreakerqueries
- the queries.
-
MaxScoreOrQuery
Build a MaxScoreOrQuery object.- Parameters:
tieBreaker
- The tiebreakerqueries
- the queries as a Collection.
-
-
Method Details
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Specified by:
build
in interfaceQuery
- Overrides:
build
in classOrQuery
- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
_tagNameForToString
Description copied from class:OrQuery
The tag name forOrQuery.toString(int)
debug method.- Overrides:
_tagNameForToString
in classOrQuery
- Returns:
- The tag name for
OrQuery.toString(int)
debug method.
-
hashCode
-
equals
-