|
|||||||
Boolean operatorsYou can use the Boolean operators AND, OR, and NOT in both content and property queries. The Boolean operator NEAR can be used only in content queries. You can use Boolean operators in both long-form and short-form queries. For more information on long-form and short-form queries, see Query language forms. When you use the NEAR operator in a query, a document matches the query if the words are within 50 words of each other in the document. The closer together the words are, the higher the rank that is assigned to the document in the result set. If the words are more than 50 words apart, they are not considered near enough, and the document is assigned a rank of zero. The NEAR operator can be applied only to words or phrases. In content queries, use the NOT operator only after the AND operator. Use the NOT operator only to exclude documents that match a previous content restriction. For property-value queries, the NOT operator can be used apart from the AND operator. The following table explains the Boolean operators and their associated symbols.
Boolean operators are available only in English. The following table shows some examples of the use of Boolean operators:
Note
Order of precedence rulesBoolean operators are evaluated in the following order:
After precedence rules are applied, operators are processed left to right. You can use parentheses (( )) to override the normal precedence. For example, the first three queries are equivalent, but the fourth is not:
In the fourth query, the OR operator is evaluated first because the expression is enclosed in parentheses. |
| Copyright©
2000 Unicomp Laboratories, Inc. All rights reserved. Site last updated : Friday, May 4, 2001 3:07 PM For feedbacks and comments please send email to comments@unicomplabs.com. 46 Cain Drive, Brentwood NY 11717 Tel : (631) 231 - 1800 Fax : (631) 231 - 4842 |
![]() |