Using Database-Directed Indexing - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

</cfoutput>
<!--- Index record set --->
<cfindex action="update"
collection="pop_query"
key="messagenumber"
type="custom"
title="subject"
query="p_messages"
body="body">
<!--- Search messages for the word "action" --->
<cfsearch collection="pop_query"
name="s_messages"
criteria="action">
<!--- Output search record set --->
<cfoutput query="s_messages">
#key#, #title# <br>
</cfoutput>

Using database-directed indexing

You can use the
populate, the index. The
as its value. When
path
the record set. When
any action—as defined by the
filenames or filepaths.
The following figure shows a database that you can use to populate a collection:
The following code shows how to populate a collection named snippets with files that are
specified in the description column of the database:
<html>
<head>
<title>Database-directed index population</title>
</head>
<body>
<cfquery name="bookquery"
datasource="book">
SELECT * FROM book where bookid='file'
</cfquery>
<cfoutput query="bookquery">
#url#,#description# <br>
532
Chapter 24: Building a Search Interface
tag with a database that contains information on how to construct, or
cfindex
tag has a
cfindex
type=custom
or
type=file
type=custom
action
attribute, which can have
type
, ColdFusion populates a collection with the contents of
, the record set becomes the input to perform
attribute—that uses the
,
custom
file
attribute as input for
key
, or

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents