User Guide

Table Of Contents
Enhancing search results 567
Narrowing searches using categories
Verity lets you organize your searchable documents into categories. Categories are groups of
documents (or database tables) that you define, and then let users search within them. For
example, if you wanted to create a search tool for a software company, you might create categories
such as whitepapers, documentation, release notes, and marketing collateral. Users can then
specify one or more categories in which to search for information. Thus, if users visiting the
website wanted to learn about a conceptual aspect of your company’s technology, they might
restrict their search to the whitepaper and marketing categories.
Typically, you will want to provide users with pop-up menus or check boxes from which they can
select categories to narrow their searches. Alternately, you might create a form that lets users enter
both a category name in which to search, and search keywords.
To create a search application that uses categories:
1.
Create a collection with support for categories enabled.
See “Creating collections with support for categories” on page 567.
2.
Index the collection, specifying the category and categoryTree attributes appropriate to the
collection.
For more information on indexing Verity collections with support for categories, see “Indexing
collections that contain categories” on page 568.
3.
Create a search page that lets users search within the categories that you’ve created.
Create a search page using the
cfsearch tag that lets users more easily search for information
by restricting searches to the specified category and, if specified, its hierarchical tree.
For more information on searching Verity collections with support for categories, see
“Searching collections that contain categories” on page 569.
Creating collections with support for categories
You can either select Enable Category Support from the ColdFusion MX Administrator, or
write a
cfcollection tag that uses the category attribute. By enabling category support, you
create a collection that contains a Verity Parametric Index (PI).
<cfcollection
action = "action"
collection = "collectionName"
path = "path_to_verity_collection"
language = "English"
categories = "yes">
For more information on using the cfcollection tag to create Verity collections with support
for categories, see
cfcollection in Chapter 2, “ColdFusion Tags,” in CFML Reference.