Package org.ametys.cms.search.query
Class BooleanQuery
Represents a
Query testing a boolean field.-
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
ConstructorsConstructorDescriptionBooleanQuery(String fieldPath) Build a BooleanQuery testing the existence of the field.BooleanQuery(String fieldPath, Boolean value) Build a BooleanQuery.BooleanQuery(String fieldPath, Query.Operator op, Boolean value) Build a BooleanQuery. -
Method Summary
Methods inherited from class org.ametys.cms.search.query.AbstractOperatorQuery
equals, getFieldName, getOperator, getValue, hashCode, rewrite, valueForQueryMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.query.Query
buildAsJson, toString
-
Constructor Details
-
BooleanQuery
Build a BooleanQuery testing the existence of the field.- Parameters:
fieldPath- the field's path
-
BooleanQuery
Build a BooleanQuery.- Parameters:
fieldPath- the field's pathvalue- the value.
-
BooleanQuery
Build a BooleanQuery.- Parameters:
fieldPath- the field's pathop- the operator.value- the value.
-
-
Method Details
-
build
Description copied from interface:QueryBuild the solr query string representing the Query object.- Specified by:
buildin interfaceQuery- Overrides:
buildin classAbstractOperatorQuery<Boolean>- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-