Creating a Searchable Data Source
279
<cfoutput>
The collection #Form.IndexColl# has been indexed.
</cfoutput>
</body>
</html>
3
Save the file as
collectionindexaction.cfm.
4
View
collectionindexform.cfm
in your browser, enter values, and then click
Index.
Building a search interface
After you create and index a searchable data source, you need to build a search
interface to allow users to access the data source. The
cfsearch
tag provides users
with a set of operators and modifiers to create sophisticated query expressions. This
section describes how to get a basic search application up and running. Later
sections explore these options in detail.
Using the Verity Wizard in ColdFusion Studio
To quickly create a search application for an existing collection, select
File > New
in
ColdFusion Studio and select the Verity Wizard in the CFML tab of the New
Document dialog box. The wizard creates a set of application pages based on the
entries you make in the wizard pages.
You can customize the search interface by adding instructional text for users and
applying styles to the form pages.
Basic search operations
The following procedure describes the basic search operations.
To search the collection:
1
Create a file in ColdFusion Studio.
2
Modify the file so that it appears as follows:
<html>
<head>
<title>Select the collection to search</title>
</head>
<body>
<h2>Search</h2>
<form method="Post" action="collectionsearchaction.cfm">
<p>Enter the collection you want to search:
<input type="text" name="collection" size="25" maxlength="35"></p>
<p>Select the type of search:<br>
<input type=radio
name=type
Summary of Contents for COLDFUSION 5-DEVELOPING
Page 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Page 58: ...38 Chapter 3 Querying a Database ...
Page 134: ...114 Chapter 7 Updating Your Database ...
Page 210: ...190 Chapter 10 Reusing Code ...
Page 232: ...212 Chapter 11 Preventing and Handling Errors ...
Page 238: ...218 Chapter 12 Using the Application Framework ...
Page 262: ...242 Chapter 12 Using the Application Framework ...
Page 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Page 320: ...300 Chapter 15 Indexing and Searching Data ...
Page 336: ...316 Chapter 16 Sending and Receiving E mail ...
Page 374: ...354 Chapter 18 Interacting with Remote Servers ...