Search Order and Parentheses
When you use two or more different operators, the order in which these operators are executed is determined by operator precedence. You can override this order by using parentheses (grouped terms between round brackets). Content within parentheses is interpreted as one unit. Operators within brackets have priority over operators outside brackets. It is advised to use parentheses in complex search statements (more than two different operators).
When using brackets, you can leave a space between the operator/term and the first bracket, or not:
NOT(term)
NOT (term)
Search Order and Parentheses Examples
Examples |
Results |
---|---|
(cars AND sales) OR car dealer |
When OR precedes AND, use parentheses to first find the files that are connected with the operator AND.
Files with cars and sales are retrieved.
|
(disk drive AND printer AND modem) OR (sales AND revenue AND profit) |
Files with all terms from at least one set of parentheses are retrieved:
|
((cars AND trucks) OR trains) AND (ships OR submarines) |
Only files with terms from both sides are retrieved:
|
chicago OR los angeles AND new york
|
Remember: OR precedes AND.
|
chicago OR (los angeles AND new york) |
Parentheses overrides precedence.
|