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
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.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.boolean
int
hashCode()
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: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.
-
buildAsJson
Description copied from interface:Query
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.- Specified by:
buildAsJson
in interfaceQuery
- Overrides:
buildAsJson
in 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:Query
Rewrite this Query to allow further optimisations. -
_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
-