# Searching a ColdFusion Web Site

Until now, you've searched for records in databases based on the value of particular fields using ODBC. However, to efficiently search through paragraphs of text or files of varying types requires full-text search capabilites. The Verity, Inc. search engine is bundled with ColdFusion to provide full-text indexing and searching.

The ColdFusion online documentation employs Verity to allow you to search the installed document set.

Here are some of the possible uses for Verity in ColdFusion:

- Index your Web site and provide a generalized search mechanism, such as a form interface, for executing searches.
- Index specific directories containing documents for subject-based searching.
- Index CFQUERY result sets, giving your end users the ability to search against the data. Since collections are made up of data optimized for retrieval, this method is much faster than performing multiple database queries to return the same data.
- Index CFLDAP and CFPOP query results.
- Manage and search collections generated outside of ColdFusion using native Verity tools. This additional capability requires only that the full path to the collection be specified in the index command.
- Index email generated by ColdFusion application pages and create a searching mechanism for the indexed messages.
- Build collections of inventory data and make those collections available for searching from your ColdFusion application pages.
- Support international users in a range of languages from both the CFINDEX and CFSEARCH tags.

## Advantages of using Verity

Verity can index the output from queries so that you or an end user can search against the result sets. This has a clear advantage in speed of execution because pointers to the result sets are stored in a Verity index that is optimized for searching. You can reduce the programming overhead of query constructs by allowing users to construct their own queries and execute them directly. You need only be concerned with presenting the output to the client browser.

Verity can index database text fields, such as notes and product descriptions, that cannot be effectively indexed by native database tools.

When indexing collections containing documents in Adobe Acrobat (PDF) format, Verity scans for the document title (if one has been entered in Acrobat Exchange). The document title displays in the search results list.

Indexing Web pages returns the URL for each document. This is a valuable document management feature.

## Online Verity training

A video titled "Creating Search Engines with Verity" is available at http://alive.allaire.com. The video gives an overview of the Verity implementation in ColdFusion and illustrates the development process with sample code.

The video is part of Allaire Alive, an educational service that offers Web videos on topics specific to ColdFusion development and application deployment as well as broader industry issues. The titles are available free for online viewing or download.