Indexing Query Results; Indexing Database Query Results - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

282

Indexing Query Results

The following sections describe the reasons and procedures for indexing the results
of database, LDAP, and pop queries.

Indexing database query results

The main advantage of performing searches against a Verity collection over using
cfquery
Use this technique instead of
Indexing the result set from a ColdFusion query involves an extra step not required
when you index documents. You must code the query and output parameters, and
then point the
To index a ColdFusion query:
1
2
3
To populate a collection from a
corresponds to the primary key of the data source table, and a
column or columns that you want to search for the index. The following extract
shows only the
<!--- Select the entire table --->
<cfquery name="Messages"
</cfquery>
<!--- Output the result set --->
<cfoutput query="Messages">
</cfoutput>
<!--- Index the result set --->
<cfindex collection="DBIndex"
alone is that the database is indexed in a form that provides faster access.
You want to index textual data. You can search Verity collections containing
textual data much more efficiently with
with
.
cfquery
You want to give your users access to data without interacting directly with the
data source itself.
You want to improve the speed of queries.
You want your end users to run queries but not update database tables.
cfindex
Create a collection on the ColdFusion Administrator Verity Collections page.
Execute a query and output the data.
Populate the collection using the
cfquery
datasource="MyMail">
SELECT *
FROM Messages
#Message_ID#, #Subject#, #Title#, #MessageText#
action="Update"
type="Custom"
in the following cases:
cfquery
cfindex
tag at the result set from a
cfindex
you specify a
cfquery
and
parts of the process.
cfindex
Chapter 15 Indexing and Searching Data
than by searching a database
,
cfquery
cfldap
tag.
attribute, which
key
body
, or
query.
cfpop
attribute, the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 5

Table of Contents