User Guide
280 Chapter 15 Indexing and Searching Data
value=simple checked> Simple<br>
<input type=radio
name=type
value=explicit> Explicit<br>
<p>Enter a search string:</p>
<input type=text
name=searchstring size=50>
<p><input type=submit
name=search1
value="Search">
<input type=reset
value="Reset">
</form>
</body>
</html>
3 Save the file as collectionsearchform.cfm.
Note
To use cfsearch to search a Verity K2 Server collection, the collection attribute
must be the collection’s unique alias name as defined in the k2server.ini and the
external attribute must be "No" (the default).
To present the results of the search to the user:
1 Create a new file in ColdFusion Studio.
2 Modify the file so that it appears as follows:
<html>
<head>
<title>Search output page</title>
</head>
<body>
<cfsearch name="Search1"
collection="#form.collection#"
form type="#form.type#"
criteria="#form.searchstring#">
<h2>Search Results</h2>
<cfoutput>
#Search1.RecordCount# found out of
#Search1.RecordsSearched# searched.
</cfoutput>
<hr noshade>
<cfoutput query="Search1">
<a href="#Search1.URL#">#Search1.title#</a><br>
</cfoutput>