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
Fields inherited from interface org.ametys.cms.search.query.Query
BOOL_FILTER, BOOL_MUST, BOOL_MUST_NOT, BOOL_SHOULD -
Constructor Summary
ConstructorsConstructorDescriptionMaxScoreOrQuery(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 StringThe tag name forOrQuery.toString(int)debug method.build()Build the solr query string representing the Query object.Build the solr query representing the Query object.
The return type may be either String or Map<String, Object> following the Solr JSON Query DSL.booleaninthashCode()rewrite()Rewrite this Query to allow further optimisations.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:QueryBuild the solr query string representing the Query object.- Specified by:
buildin interfaceQuery- Overrides:
buildin classOrQuery- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-
buildAsJson
Description copied from interface:QueryBuild the solr query representing the Query object.
The return type may be either String or Map<String, Object> following the Solr JSON Query DSL.- Specified by:
buildAsJsonin interfaceQuery- Overrides:
buildAsJsonin classOrQuery- Returns:
- the solr query representing the Query object. Can be empty in case of empty query.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-
rewrite
Description copied from interface:QueryRewrite this Query to allow further optimisations. -
_tagNameForToString
Description copied from class:OrQueryThe tag name forOrQuery.toString(int)debug method.- Overrides:
_tagNameForToStringin classOrQuery- Returns:
- The tag name for
OrQuery.toString(int)debug method.
-
hashCode
-
equals
-