NOT (~)
Use the NOT operator to search for documents that contain one query term and not another.
Syntax
| Syntax | Description |
|---|---|
term1~term2 term1 not term2 |
Returns documents that contain term1 and not term2. |
Examples for NOT Operator
To obtain the documents that contain the term animalsbut not dogs, use the following expression:
'animals ~ dogs'
Similarly, to obtain the documents that contain the termtransportation but not automobilesortrains, use the following expression:
'transportation not (automobiles or trains)'
Note: The NOT operator does not affect the scoring produced by the other logical operators.