The Verity Search Language

When you search a Verity collection using the CFSEARCH tag, you can specify the type of search to be performed using the TYPE attribute. As discussed earlier in this chapter, the TYPE attribute can be set to either Simple (the default) or Explicit. Simple searches consist of a word or words. Explicit searches make use of operators and modifiers and must specifically invoke each one in order to fine-tune the search. In the case of a Simple search, operators and modifiers are employed by default.

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 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 either “trout,” “bass,” or “carp.” Simple searches treat the comma as a Boolean OR. Phrases can also be used as CRITERIA ...

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.