| Component | Purpose |
| Logical Operators | Define the relationships between the terms in a query expression and specify the output returned by the query. |
| Wildcard Characters | Expand query terms using pattern matching. |
| Grouping Characters | Group terms and operators in a query expression. |
Operands can be any query terms, as well as other operators.
AND Operator
Use the AND operator to search for documents
that contain at least one occurrence of each of the query terms.
For example, to obtain all the documents that contain the terms
seimas and republic and lithuania, issue the following
query: 'seimas & republic & lithuania'
OR Operator
Use the OR operator to search for documents that
contain at least one occurrence of any of the query terms. For
example, to obtain the documents that contain the term seimas or
the term parliament, use the following expression:
'seimas | parliament'
NOT Operator
Use the NOT operator to search for documents
that contain one query term and not another. For example, to obtain the
documents that contain the term parliament but not government,
use the following expression:
'parliament ~ government'
Similarly, to obtain the documents that contain
the term transportation but not automobiles or
trains, use the following expression:
'transportation not (automobiles or trains)'
Equivalence Operator
Use the equivalence operator to specify an
acceptable substitution for a word in a search. For example, if you want
all the documents that contain the phrase parliament issues the law
or seimas issues the law, you can write:
'parliament=seimas issues the law'
Precedence of Equivalence Operator
The equivalence operator has higher precedence that all other
operators.
| Operator | Syntax | Description |
| AND |
term1&term2 term1 and term2 |
Returns documents that contain term1 and term2. All query terms must occur. |
| OR |
term1|term2
term1 or term2 |
Returns documents that contain term1 or term2. At least one term must exist. |
| NOT |
term1~term2 term1 not term2 |
Returns documents that contain term1 and not term2 |
| EQUIVALENCE |
term1=term2
term1 equiv term2 |
Specifies that term2 is an acceptable substitution for term1. |
| Wildcard Character | Description |
| % | The percent wildcard specifies that any characters can appear in multiple positions represented by the wildcard. |
| * | The asterisk wildcard has the same meaning as the percent wildcard. |
For example, the open parenthesis indicates the beginning of a group.
The first close parenthesis encountered is the end of the group. Any open
parentheses encountered before the close parenthesis indicate nested groups.
Operator Precedence
Operator precedence is the order in which the
components of a query expression are evaluated.
In all cases, query expressions are evaluated in order from left to right according to the precedence of their operators. Operators with higher precedence are applied first. Operators of equal precedence are applied in order of their appearance in the expression from left to right.