To efficiently search through paragraphs of text or files of varying types, you need full-text search capabilities. ColdFusion includes the Verity search engine, which provides full-text indexing and searching.
The Verity engine performs searches against collections, not against the actual documents. A collection is a special database created by Verity that contains metadata that describes the documents that you have indexed. The indexing process examines documents of various types in a collection and creates a metadata description-the index-which is specialized for rapid search and retrieval operations.
The ColdFusion implementation of Verity supports collections of the following basic data types:
cfquery
, cfldap
, and cfpop
queriesYou can build collections from individual documents or from an entire directory tree. Collections can be stored anywhere, so you have much flexibility in accessing indexed data.
In your ColdFusion application, you can search multiple collections, each of which can focus on a specific group of documents or queries, according to subject, document type, location, or any other logical grouping. Because you can perform searches against multiple collections, you have substantial flexibility in designing your search interface.
Here are some ways to use Verity with ColdFusion:
cfquery
record sets, giving users the ability to search against the data. Because collections contain data optimized for retrieval, this method is much faster than performing multiple database queries to return the same data.cfldap
and cfpop
query results.cfindex
, cfcollection
, and cfsearch
tags.Verity can index the output from queries so that you or a user can search against the record sets. Searching query results has a clear advantage over using SQL to search a database directly in speed of execution because metadata from the record sets are stored in a Verity index that is optimized for searching.
Performing a Verity search has the following advantages over other search methods:
The ColdFusion Verity implementation supports a wide array of file and document types. As a result, you can index web pages, ColdFusion applications, and many binary document types and produce search results that include summaries of these documents.
To support multiple WYSIWYG document types, Verity bundles the KeyView Filter Kit. The KeyView Filter Kit includes document filters that support the indexing and viewing of more than 45 native document formats. Numerous popular document suites and formats are supported, including Microsoft Office 95, 97, and 2000, Corel WordPerfect, Microsoft Word, Microsoft Excel, Lotus AMI Pro, and Lotus 1-2-3.
The Verity KeyView filters support the following formats:
ColdFusion supports Verity Locales in European and Asian languages. For European languages, ColdFusion uses LinguistX technology from Inxight; for Asian languages, ColdFusion uses ICU (IBM® Classes for Unicode) technology. For more information about installing Verity Locales, see Installing ColdFusion MX.
The default language for Verity collections is English. To index data in another supported language, select it from the drop-down list when you create a collection with the ColdFusion Administrator. In CFML, the cfcollection
, cfindex
, and cfsearch
tags have an optional language
attribute that you use to specify the language of the collection that you are searching. If you do not specify a language in these tags, ColdFusion checks the neo-verity.xml file for the collection's language. If this is defined, ColdFusion uses that language.
Use the following table to find the correct value for the language
attribute for your collection; for example, the following code creates a collection for simplified Chinese:
<cfcollection action = "create" collection = "lei_01"
path = "c:\cfusionmx\verity\collections" language = "simplified_chinese">
The following table lists the languages names and attributes that ColdFusion supports:
You can register collections in the Administrator or by creating a collection with the cfcollection
tag. If you register a given collection with ColdFusion and you specify a language
attribute, then you do not have to specify the language
attribute when using cfindex
and cfsearch
for that collection. If you do not register a given collection with ColdFusion, the language defaults to English, unless you specify it in the language
attribute for the cfindex
and cfsearch
tags for that collection.