Logical operators such as AND
or OR
allow you to limit your search criteria in a number of ways. Table 4-2 describes some of these operators.
Operator | Symbol | Description | Example Expression |
---|---|---|---|
|
& |
Use the Score returned is the minimum of the operands. |
'cats AND dogs' 'cats & dogs' |
|
| |
Use the Score returned is the maximum of the operands. |
'cats | dogs' 'cats OR dogs' |
|
~ |
Use the |
To obtain the documents that contain the term animals but not dogs, use the following expression: 'animals ~ dogs' |
|
, |
Use the |
The following query returns all documents that contain the terms dogs, cats and puppies giving the highest scores to the documents that contain all three terms: 'dogs, cats, puppies' |
|
= |
Use the |
The following example returns all documents that contain either the phrase alsatians are big dogs or German shepherds are big dogs: 'German shepherds=alsatians are big dogs' |