Multiple predicates
Operators
Operators allow terms to be combined through logical operators. sensenet query language supports AND, "+", OR, NOT and "-" as Boolean operators (boolean operators must be ALL CAPS like keywords).
The OR operator is the default conjunction operator. This means that if there is no operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets.
GET https://example.com/OData.svc/Root?query=Color:White OR Color:RedThe AND operator matches documents where both terms exist anywhere in the text or fields of a single document.
GET https://example.com/OData.svc/Root?query=Color:White AND Style:SedanUsing the + or mandatory operator is an alternative to the AND keyword. This sign must be placed in front of all terms that would be connected with the AND operator.
GET https://example.com/OData.svc/Root?query=+Color:White +Style:SedanThe NOT operator excludes content that contain the term after NOT. (The Lucene engine's limitation: it cannot be used with only one term.)
GET https://example.com/OData.svc/Root?query=Color:White AND NOT Style:SedanThe "-" or prohibit operator excludes documents that contain the term after the "-" symbol. This is the alternative of the NOT operator.
GET https://example.com/OData.svc/Root?query=+Color:White -Style:SedanGrouping
sensenet query language supports use of parentheses to group clauses and form sub queries.
Following query demonstrate how you can group multiple predicates:
GET https://example.com/OData.svc/Root?metadata=no&query=Color:White AND (Style:Sedan OR Price:<10000000)