The simple query is the default query type and is appropriate for the vast majority of searches. When entering text on a search form, you perform a simple query by entering a word or comma-delimited strings, with optional wildcard characters. Verity treats each comma as a logical OR. If you omit the commas, Verity treats the expression as a phrase.
The following table shows examples of simple searches:
Example |
Search result |
---|---|
low,brass,instrument |
low or brass or instrument |
low brass instrument |
the phrase, low brass instrument |
film |
film, films, filming, or filmed |
filming AND fun |
film, films, filming, or filmed, and fun |
filming OR fun |
film, films, filming, or filmed, or fun |
filming NOT fun |
film, films, filming, or filmed, but not fun |
The operators AND and OR, and the modifier NOT, do not require angle brackets (<>). Operators typically require angle brackets and are used in explicit queries. For more information about operators and modifiers, see Operators and modifiers.
By default, Verity interprets words in a simple query as if you entered the STEM operator (and MANY modifier). The STEM operator searches for words that derive from a common stem. For example, a search for instructional returns files that contain instruct, instructs, instructions, and so on.
The STEM operator works on words, not word fragments. A search for "instrument" returns documents containing "instrument," "instruments," "instrumental," and "instrumentation," whereas a search for "instru" does not. (A wildcard search for instru* returns documents with these words, and also those with instruct, instructional, and so on.)
In CFML, enter your search terms, operators, and modifiers in the criteria attribute of the cfsearch tag:
<cfsearch name="search_name" collection="bbb" type="simple" criteria="instructional">
When entering text on a search form, you can prevent Verity from implicitly adding the STEM operator by doing one of the following:
<cfsearch name="search_name" collection="bbb" type="simple" criteria='"instructional"'