Boolean operators

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:

  • "soccer" AND "volleyball"
  • "soccer" && "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:

  • "soccer" NOT "volleyball"
  • "soccer" ! "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:

  • "soccer" OR "volleyball"
  • "soccer" || "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

Please note that the Boolean operators AND and NOT must be specified in uppercase.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.43.206