cfindex

Populates a Verity search engine collection with an index of
documents on a file system or of CFML query result sets.

A collection must exist before it can be populated.

 <cfindex collection="">

 cfindex(collection="");

cfindex Attribute Reference

collection
Required

Name of a collection that is registered by CFML; for
example, "personnel"
Name and absolute path of a collection that is not
registered by CFML; for example:
"e:\collections\personnel"

action

- update: updates a collection and adds key to the index.
- delete: removes collection documents as specified by
the key attribute.
- purge: deletes all of the documents in a collection.
Causes the collection to be taken offline, preventing
searches.
- refresh: deletes all of the documents in a collection,
and then performs an update. Values:
  • update
  • delete
  • purge
  • refresh

type

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. Values:
  • file
  • path
  • custom

title

* 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

* 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

* 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

Custom field in which you can store data during an indexing
operation. Specify a query column name for type, and a
query name.

custom2

Custom field in which you can store data during an indexing
operation. Specify a query column name for type, and a
query name.

custom3

Custom field in which you can store data during an indexing
operation. Specify a query column name for type, and a
query name. (Added in ColdFusion 7)

custom4

Custom field in which you can store data during an indexing
operation. Specify a query column name for type, and a
query name. (Added in ColdFusion 7)

category

A string value that specifies one or more search categories
for which to index the data. You can define multiple
categories, separated by commas, for a single index.

categoryTree

A string value that specifies a hierarchical category or
category tree for searching. It is a series of categories
separated by forward slashes ("/"). You can specify only
one category tree.

urlpath

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

Delimited list of file extensions that CFML 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, "*."

query

Query against which collection is generated

recurse
Default: NO

Yes: if type = "path", directories below the path
specified in key are included in indexing operation

language
Default: english

For options, see cfcollection. Requires the appropriate
Verity Locales language pack (Western Europe, Asia,
Multilanguage, Eastern Europe/Middle Eastern).

status

The name of the structure into which ColdFusion MX
returns status information.

prefix

Specifies the location of files to index when the computer that contains the K2 Search Service is not the computer on which you installed ColdFusion, and when you index files with the type attribute set to path.

Fork me on GitHub