User Guide

298 Chapter 15 Indexing and Searching Data
Managing Collections
As with any data source, the maintenance requirements of a Verity collection are
dictated by the number, frequency, and type of changes that occur in the records.
You can run maintenance routines directly from either the
cfcollection or cfindex
tags or via the Administrator Verity Collections page. For more information on this
topic, see the Knowledge Base article Maintaining Collections (ID# 1080) at http://
www.coldfusion.com/Support/KnowledgeBase/SearchForm.cfm.
The easiest way to perform collection management tasks is to create a ColdFusion
page that runs the operations, and then add the task on the Administrator Scheduler
page. The page presents a wide range of scheduling options.
Maintenance options
Choose an option based on the following function descriptions:
Repair Runs internal Verity routines to fix corrupted records. If you suspect a
collection is corrupted, it is probably safest to repopulate it.
Optimize Packs the indexed data for better performance. You can use this
procedure, which is similar to database optimization, as part of routine
maintenance.
You should not use the Optimize action in a cfindex tag except to maintain
legacy code. The
cfcollection tag is recommended instead. For more
information on this command, see the Knowledge Base article How To Optimize
Your Verity Collection (ID# 416) at http://www.coldfusion.com/Support/
KnowledgeBase/SearchForm.cfm.
Purge Removes all data marked for deletion from a collection.
Delete as the
cfindex action attribute Marks for deletion the specified key
attribute value, or comma-separated values, from the collection. Use Purge to
remove these items.
Delete on the Administrator Verity Collections page or in cfcollection Deletes
the entire collection.
Update Repopulates the collection with changed records and new records and
adds a key if one is not part of the collection. This operation does not delete
records that have been deleted from the data source. To update a collection from
the Administrator Verity main page, select a collection on the list, click Index, and
then click Update on the index page.
Refresh (
cfindex action attribute only) Deletes all data and repopulates the
collection.
Securing a collection
Scenarios for restricting access to a Verity collection include:
The ColdFusion Administrator might need to specify developer access to
collections.
A public site might need to limit user access to collections.