22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

<br />

<br />

<br />

2. Save the file as collection_search_action.cfm.<br />

NOTE<br />

This overwrites the previous <strong>ColdFusion</strong> example page.<br />

3. View collection_search_form.cfm in the web browser:<br />

4. Enter any misspelled target words and click Search.<br />

Narrowing searches using categories<br />

Verity lets you organize your searchable documents into categories. Categories are groups of<br />

documents (or database tables) that you define, and then let users search within them. For<br />

example, if you wanted to create a search tool for a software company, you might create<br />

categories such as whitepapers, documentation, release notes, and marketing collateral. Users<br />

can then specify one or more categories in which to search for information. Thus, if users<br />

visiting the website wanted to learn about a conceptual aspect of your company’s technology,<br />

they might restrict their search to the whitepaper and marketing categories.<br />

Typically, you will want to provide users with pop-up menus or check boxes from which they<br />

can select categories to narrow their searches. Alternately, you might create a form that lets<br />

users enter both a category name in which to search, and search keywords.<br />

To create a search application that uses categories:<br />

1. Create a collection with support for categories enabled.<br />

See “Creating collections with support for categories” on page 689.<br />

2. Index the collection, specifying the category and categoryTree attributes appropriate to<br />

the collection.<br />

For more information on indexing Verity collections with support for categories, see<br />

“Indexing collections that contain categories” on page 689.<br />

3. Create a search page that lets users search within the categories that you’ve created.<br />

Create a search page using the cfsearch tag that lets users more easily search for<br />

information by restricting searches to the specified category and, if specified, its<br />

hierarchical tree.<br />

For more information on searching Verity collections with support for categories, see<br />

“Searching collections that contain categories” on page 690.<br />

688 Building a Search Interface

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!