Search Using Boolean Operators
This topic describes how to perform an advanced search using Boolean operators OR, AND, NOT, - Operator, + Operator.
OR
|
This feature only works when the Allow Query Syntax checkbox is selected in the advanced search form.
|
The OR operator links two terms and finds a matching document if either of the terms exist in the document. This is equivalent to a union using sets.
You can use the || symbol sequence instead of the OR word. To search for documents that contain either jakarta apache or just jakarta strings, use the following query:
"jakarta apache" OR jakarta
The default operator used when neither OR nor AND is present in the query expression is AND.
To use
OR, either write it in the query, or use the
Extended search.
AND
|
This feature only works when the Allow Query Syntax checkbox is selected in the advanced search form.
|
The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. You can use the && symbol sequence instead of AND operator. To search for documents that contain both jakarta apache and the Apache Codebeamerterms, use the following query:
"jakarta apache" AND "Apache codebeamer"
The default operator is AND. Hence the above query is equivalent the following query:
"jakarta apache" "Apache codebeamer"
+ Operator
|
This feature only works when the Allow Query Syntax checkbox is selected in the advanced search form.
|
The + operator requires that the term after the + symbol exists in the document. To search for documents that must contain the jakarta term and may contain the apache term, use the following query:
+jakarta OR apache
- Operator
|
This feature only works when the Allow Query Syntax checkbox is selected in the advanced search form.
|
The - operator excludes documents that contain the term after the - symbol. To search for documents that contain jakarta apache term, but not the Apache Codebeamer term, enter the following query:
"jakarta apache" -"Apache codebeamer"
NOT
|
This feature only works when the Allow Query Syntax checkbox is selected in the advanced search form.
|
The NOT operator excludes documents that contain the term after the NOT operator. This is equivalent to difference using sets.
You can use the ! symbol instead of the NOT word.
To search for documents that contain the jakarta apache term, but not the Apache Codebeamer term, use the query:
"jakarta apache" NOT "Apache codebeamer"
The NOT operator cannot be used with just one term.
For example, the following search returns no results:
NOT "jakarta apache"