When you search a Verity collection, you use the CFX_SEARCH tag in a Cold Fusion template. You use the CRITERIA attribute to specify the query expression you want to pass to the search engine. You can build two types of query expressions: Simple and Explicit. A simple query expression is typically a word or words. An Explicit query expression can employ a number of operators and modifiers to refine the search. Although an Explicit query can employ operators and modifiers, all aspects of the search must be explicitly invoked. A Simple query expression is somewhat more powerful since it employs operators by default. You can assemble an Explicit query expression programmatically or simply pass a Simple query expression to the search engine directly from an HTML input form.
The Verity query language provides many operators and modifiers for composing queries. The following search techniques can be used in searching a Verity collection:
Simple queries allow end users to enter simple, comma-delimited strings and use wildcard characters. By default, a simple query searches for words, not strings. For example, entering the word "Micros" will find only documents containing the word "micros" and not "Microsoft." You can use wildcards, however to broaden the scope of the search. "Micros*" will return documents containing both "micros" and "Microsoft." Case is ignored.
You can enter multiple words separated by commas: software, Microsoft, Oracle. The comma in a Simple query expression is treated like a logical OR. If you omit the commas, the query expression is treated as a phrase, so that documents would be searched for the phrase "software Microsoft Oracle."
Ordinarily, operators are employed in Explicit query expressions. Operators are normally surrounded by angle brackets < >. However, you can use the AND, OR, and NOT operators in a Simple query without using angle brackets: software AND (Microsoft OR Oracle). To include an operator in a search, you surround it with double quotation marks: software "and" Microsoft. This expressions searches the phrase "software and Microsoft."
A simple query employs the STEM operator and the MANY modifier. STEM searches for words that derive from those entered in the query expression, so that entering "find" will return documents that contain "find," "finding," "finds," etc. The MANY modifier forces the documents returned in the search to be presented in a list based on a relevancy score.
Explicit queries can be constructed using a variety of operators, including evidence, proximity, relational, concept, and score operators. Most operators in an Explicit query expression are surrounded by angle brackets < >. You can use the AND, OR, and NOT operators without angle brackets. For more information about using operators in query expressions, see the Operator Summary.
See The
CFX_SEARCH Tag for more information on CFX_SEARCH syntax.
See Operator Summary
for detailed information about using operators in search queries.
When using simple query syntax, you can state a query expression using simple or explicit syntax. The syntax you use determines whether the search words you enter will be stemmed, and whether the words that are found will contribute to relevance-ranked scoring.
When you use simple syntax, the search engine implicitly interprets single words you enter as if they were modified by the MANY and STEM operators. By implicitly applying the MANY modifier, the search engine calculates each doucment's score based on the density of the search term in the searched documents. The more dense the occurence of a word in a document, the higher the document's score.
As a result, the search engine ranks documents according
to word density as it searches for the word you specify, as well as words
that have the same stem. For example, "films," "filmed,"
and "filming" are stemmed variations of the word "film."
To search for documents containing the word "film" and its stem
words you can enter the word "film" without modification. When
documents are ranked by relevance, they appear in a list with the most
relevant documents at the top of the list.
When you use explicit syntax, the search engine interprets the search terms you enter as literals. For example, by entering the word "film" (including quotation marks) using explicit synatx, the stemmed versions of the word "film," "films," "filmed," and "filming" are ignored.