Working with data returned from a query

Using Verity, you can search data returned by a query--such as a database record set--as if it were a collection of documents stored on your web server. Using Verity to search makes implementing a search interface much easier, as well as letting users more easily find information contained in database files. This section describes the reasons and procedures for indexing the results of database and other queries. It also describes how a database can direct the indexing process, using different values for the type attribute of the cfindex tag.

This section describes the following topics:

Recordsets and types of queries

When indexing record sets generated from a query (using the cfquery, cfldap, or cfpop tag), cfindex creates indexes based on the type attribute and its set value:

Type Attribute values

File

The key attribute is the name of a column in the query that contains a full filename (including path).

Path

The key attribute is the name of a column in the query that contains a directory pathname.

Custom

The key attribute specifies a column name that can contain anything you want. In this case, the body attribute is required, and is a comma-delimited list of the names of the columns that contain the text data that is to be indexed.

The cfindex tag treats all collections the same, whether they originate from a database recordset, or if they are a collection of documents stored within your website's root folder.


View comments in LiveDocs