User Guide
194 Chapter 2: ColdFusion Tags
Attributes
Attribute Req/Opt Default Description
collection Required • Name of a collection that is registered by ColdFusion;
for example,
"personnel"
• Name and absolute path of a collection that is not
registered by ColdFusion; for example:
"e:\collections\personnel"
action Depends on
collection
attribute value;
see Usage
section
• update: updates a collection and adds key to the index.
Do not use the
cflock tag with this option.
• delete: deletes data in the entities specified by the type
attribute
• purge: deletes all keys from a collection
• refresh: purges all keys from a collection, then updates
it.
type Optional
custom, if
query
attribute is
specified.
file,
otherwise.
• file: using the
key attribute value of the query result as
input, applies
action value to filenames or filepaths.
• path: using the
key attribute value of the query result as
input, applies action to filenames or filepaths that pass
the
extensions filter
• custom: If action =
"update" or "delete": applies
action to custom entities in query results.
title Optional • Title for collection
• Query column name for type and a valid query name
Permits searching collections by title or displaying a
separate title from the key
key Depends on
action
attribute value;
see Usage
section
(empty
string)
• Absolute path and filename, if
type = "file"
• Absolute path, if
type = "path"
• A query column name (typically, the primary key column
name), if
type = "custom"
• A query column name, if type = any other value
This attribute is required for the actions listed, unless you
intend for its value to be an empty string.
body Required if
type =
"custom"
; see
Usage section
• ASCII text to index
• Query column name(s), if name is specified in query
You can specify columns in a delimited list. For example:
"emp_name, dept_name, location"
custom1 Optional Custom field in which you can store data during an
indexing operation. Specify a query column name for
type, and a query name.
custom2 Optional Usage is the same as for custom1.
URLpath Optional If
type="file" or "path", specifies the URL path. When
the collection is searched with
cfsearch, this pathname is
prefixed to filenames and returned as the
url attribute.
extensions Optional HTM,
HTML,
CFM,
CFML,
DBM,
DBML
Delimited list of file extensions that ColdFusion uses to
index files, if
type = "Path".
"*." returns files with no extension.
For example: the following code returns files with a listed
extension or no extension:
extensions = ".htm, .html,
.cfm, .cfml, "*."