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="");

Attribute Reference for the cfindex tag

collection

Required: Yes
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

Required: No
- 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

Required: No
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

Required: No
* 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

Required: No
* 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: No
* 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

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

custom2

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

custom3

Required: No
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

Required: No
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

Required: No
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

Required: No
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

Required: No
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

Required: No
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

Required: No
Query against which collection is generated

recurse

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

language

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

status

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

prefix

Required: No
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