Here is a list of Boolean operators supported by standard query parser:
Operator
|
Symbol
|
Description
|
AND
|
&&
|
Requires both terms to match. For example, we search documents that contain soccer and volleyball:
|
NOT
|
!
|
Requires that the following term not be present. For example, we search for documents that contain the phrase soccer but do not contain volleyball:
|
OR
|
||
|
Requires one of the terms to match. This is a default conjunction operator, for example, searching for documents that contains either soccer or volleyball:
|
+
|
Requires that the following term be present, for example, searching for documents that must contain soccer and that may or may not contain volleyball: +soccer volleyball |
|
-
|
Prohibits the following term, for example, searching for documents that contain soccer but not volleyball: +soccer -volleyball |