The following Boolean operators may be used when full-text searching with an Oracle database. These operators can be used by themselves or combined in a number of ways to create very specific search results. Always place Boolean operators between the keywords on which you are searching. With an Oracle database, they may not be used in conjunction with phrases.
For a description of all of the Oracle search operators, see the Full-Text Searching with Oracle Reference.
Example: Smith AND Company.
You may combine multiple AND operators on a line.
The search results must contain all words in the search string; however, the words can be located anywhere in the text of the search results.
By default, each keyword line added to the search filter is considered an AND operator with respect to the other keyword lines. Similarly, putting two or more words in the keyword area without use of a Boolean operator is considered an AND search. For example, digital photos is the same as digital AND photos.
Example: Smith OR Company.
You may combine multiple OR operators on a single line, which is the same as having multiple single-word lines.
Search results contain any of the words entered, all of them, or any combination.
Basic Boolean searches suit most of your needs, but you might want to narrow your search results even further by applying more advanced operators. While advanced, they still resemble common thought processes used in making choices.
In addition to the two simple operators discussed above, with Oracle full-text searching you can use the following operators:
Example: Smith NOT Wesson.
Returns every entry that contains SMITH, but not WESSON.
Result must not contain the specified word.
Example: Dog NEAR Cat.
Example: NEAR ((DOG, CAT), 6, TRUE).
Use when you want two words in close proximity to one another.
For queries with two terms, the number is the maximum distance allowed between the two terms. The maximum allowable number is 100.
Specify TRUE for Oracle to search for terms in the order specified. The default is FALSE.
Searching for DOG NEAR CAT uses all the defaults—equivalent to saying: NEAR ((DOG, CAT), 100, FALSE).
Useful when dealing with large amounts of data with similar words, but in different contexts.