User Guide
Creating a Searchable Data Source 279
<cfoutput>
The collection #Form.IndexColl# has been indexed.
</cfoutput>
</body>
</html>
3 Save the file as collectionindexaction.cfm.
4View 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