O'Reilly logo

Programming ColdFusion MX, 2nd Edition by Rob Brooks-Bilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Verity Search Language

When you search a Verity collection using the cfsearch tag, you specify a number of parameters, including the criteria used for the search. The search criteria consists of zero or more words and/or phrases. The search criteria can also include operators and modifiers to further refine the search. We’ll cover all of this in the next section.

It should be noted that Verity handles case sensitivity in the following way:

  • If your search string is in all lowercase characters or all uppercase characters, the search is treated as a case-insensitive search.

  • If your search string consists of mixed-case characters, the search is treated as a case-sensitive search.

This default behavior can be changed via the <case> modifier (which is addressed in the following section) to specify the case for the search.

Simple Versus Explicit Searches

Simple searches allow you to use single words, comma-delimited lists of words, and phrases as the criteria for a cfsearch. For example, if you want to return all documents containing the word “fish”, specify the word “fish” in the criteria attribute of the cfsearch tag. Similarly, entering a comma-delimited list such as “trout, bass, carp” returns all documents containing “trout”, “bass”, or “carp”. Simple searches treat the comma as a Boolean or. Phrases can also be used as criteria in a cfsearch. Phrases are searched for by entering the phrase as it appears in the criteria attribute. For example, entering the phrase “I like fishing” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required