The CFX_INDEX Tag

Use the CFX_INDEX tag to build collections containing indexed data on document files and database tables. CFX_INDEX has the following attributes:

CFX_INDEX
COLLECTION Required. Specifies a collection name.
ACTION Optional. Specifes the index action. Valid entries are:
  • UPDATE - Refreshes the index and adds the key specified in KEY to the index if it is not already defined
  • DELETE - Deletes the key specified in KEY in the collection specified in COLLECTION
TYPE Optional. Specifies the type of entity being indexed. Default is CUSTOM. Valid entries are:
  • FILE - Indexes files
  • PATH - Indexes all files in specified path that pass EXTENSIONS filter
  • CUSTOM - Indexes custom entities, such as a database table
TITLE Optional. Specifes one of the following:
  • A title for the collection
  • A query column name for any TYPE and a valid query name
  • The TITLE attribute allows searching collections by title or displaying a separate title from the actual key.
KEY Required. A unique identifier reference that specifies one of the following:
  • Document file name when TYPE=FILE
  • Fully qualified path when TYPE=PATH
  • A unique identifier when TYPE=CUSTOM, such as the table column holding the primary key
  • A query column name for any other TYPE argument
BODY Required if TYPE=CUSTOM. Ignored for TYPE=FILE and TYPE=PATH. Specifies one of the following:
  • The ASCII text to be indexed
  • A query column name when a valid query name is specified.
URLPATH Optional. Specifies the URL path for files when TYPE=FILE and TYPE=PATH. When the collection is searched with CFX_SEARCH, this path name will automatically be prepended to all file names and returned as the URL attribute.
EXTENSIONS Optional. Specifies the comma separated list of file extensions that will filter the list of files returned when TYPE=PATH. Default is .htm, .html, .cfm, .cfml, .dbm, .bdml
QUERY Optional. Specifies the name of the CFQUERY against which the collection is being generated.
RECURSE Optional. Specifies that directories below the path specified in KEY when TYPE=PATH will be included in the indexing operation. Valid entries are:
  • YES
  • NO