This topic discusses the meaning of
AND
,
OR
,
AND NOT
, and other operators enabled in Boolean search
queries.
The following statements describe semantics of Boolean query operators:
The
AND
operator executes an intersection of its two operands.The
AND NOT
operator executes a set subtract, subtracting the second operand from the first.The parentheses operators have two meanings, depending on their usage:
They can either be used to group sub-expressions, as in
"(red or blue) and car"
Or, they can be used as
AND
operators in themselves.For example, the query
"(red or blue) car"
automatically treats the")"
as a") AND"
. Thus the query would be treated as"(red or blue) and car"
.The same is true for usage of the left parenthesis.
Words or phrases grouped together without any explicit operators (such as
"red car or blue bicycle"
) are also queried conjunctively.Thus the example query would return the results for
"(red and car) or (blue and bicycle)"
. Similarly,"red car" "blue bicycle"
will return the results for"red car" AND "blue bicycle"
.As the examples demonstrate, operator names are not case sensitive, although field names are.