Boolean operators must be surrounded by one or more separators, typically white space. For example, the query peas&&carrots is not equivalent to the query peas && carrots; peas&&carrots is a single word (& is a word character).
Negation operators (- and !) are exceptions to this rule. They must be preceded by a separator, but they need not be followed by a separator. For example,
Nested Boolean query expressions
You can nest Boolean query expressions using Boolean expressions as arguments of Boolean expressions. For example, the following query searches for documents containing bird, but not garden or stone:
bird AND NOT (garden OR stone)
Query expression examples
The following are examples of query expressions.
44 Query expression syntax and matching