User Guide
270 Chapter 15 Indexing and Searching Data
Searching a ColdFusion Web Site
Until now, you have 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 you need full-text search capabilities. The Verity search
engines are bundled with ColdFusion to provide full-text indexing and searching.
Here are some of the ways to use Verity in ColdFusion:
• The ColdFusion online documentation employs Verity to let you to search the
installed document set.
• 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. Because 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 e-mail 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 the
cfindex,
cfcollection, 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. Searching query results has a clear advantage over using SQL
to search a database directly 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) in
addition to the document text and displays the title in the search results list.
Indexing Web pages returns the URL for each document. This is a valuable
document management feature.