Using explicit queries

In an explicit query, the Verity search engine literally interprets your search terms. The following are two ways to perform an explicit query:

When you enclose the search term in double quotation marks, Verity does not use the STEM operator. For example, a search for "instructional"-enclosed in quotation marks-does not return files that contain instruct, instructs, instructions, and so on (unless the files also contain instructional). As the following figure shows, this search retrieves fewer files than a search without quotation marks:

Results of a search showing the effects of the STEM operator and MANY modifier

Using AND, OR, and NOT

Verity has many powerful operators and modifiers available for searching (for more information, see "Operators and modifiers"). However, users might only use the most basic operators-AND and OR, and the modifier NOT. The following are a few important points:

Note:   Although NOT is a modifier, you use it only with the AND and OR operators. Therefore, it is sometimes casually referred to as an operator.

The following table gives examples of searches and their results:
Search term
Returns files that contain
doctorate AND nausea
both doctorate and nausea
doctorate "and" nausea
the phrase doctorate and nausea
"doctorate and nausea"
the phrase doctorate and nausea
masters OR doctorate AND nausea
masters, or the combination of doctorate and nausea
masters OR (doctorate AND nausea)
masters, or the combination of doctorate and nausea
(masters OR doctorate) AND nausea
either masters or doctorate, and nausea
masters OR doctorate NOT nausea
either masters or doctorate, but not nausea

Using wildcards and special characters

Part of the strength of the Verity search is its use of wildcards and special characters to refine searches. Wildcard searches are especially useful when you are unsure of the correct spelling of a term. Special characters help you search for tags in your code.

Searching with wildcards

The following table shows the wildcard characters that you can use to search Verity collections:
Wildcard
Description
Example
Search result
?
Matches any single alphanumeric character.
apple?
apples or applet
*
Matches zero or more alphanumeric characters. Avoid using the asterisk as the first character in a search string. An asterisk is ignored in a set, ([]) or an alternative pattern ({}).
app*ed
Appleseed, applied, appropriated, and so on.
[ ]
Matches any one of the characters in the brackets. Square brackets indicate an implied OR.
<WILDCARD> 'sl[iau]m'
slim, slam, or slum
{ }
Matches any one of a set of patterns separated by a comma,
<WILDCARD> 'hoist{s,ing,ed}'
hoists, hoisting, or hoisted
^
Matches any character not in the set.
<WILDCARD>'sl[^ia]m'
slum, but not slim or slam.
-
Specifies a range for a single character in a set.
<WILDCARD> 'c[a-r]t'
cat, cot, but not cut (that is, every word beginning with c, ending with t, and containing any single letter from a to r)

To search for a wildcard character as a literal, place a backslash character before it; for example:

Searching for special characters

The search engine handles a number of characters in particular ways as the following table describes:
Characters
Description
, ( ) [
These characters end a text token.
A token is a variable that stores configurable properties. It lets the administrator or user configure various settings and options.
= > < !
These characters also end a text token. They are terminated by an associated end character.
' ` < { [ !
These characters signify the start of a delimited token. They are terminated by an associated end character.

To search for special characters as literals, precede the following nonalphanumeric characters with a backslash character (\) in a search string:

In addition to the backslash character, you can use paired backquote characters (` `) to interpret special characters as literals. For example, to search for the wildcard string "a{b" you can surround the string with backquotes, as follows:

`a{b`

To search for a wildcard string that includes the literal backquote character (`) you must use two backquote characters together and surround the entire string in backquotes:

`*n``t` 

You can use paired backquotes or backslashes to escape special characters. There is no functional difference between the two. For example, you can query for the term: <DDA> using \<DDA\> or `<DDA>` as your search term.

Comments