cfcollection

Description

Allows you to create and administer Verity collections.

Category

Extensibility tags

Syntax


<cfcollection action = "create" or "repair" or 

    "delete" or "optimize" or "map"

  collection = "collection_name"

  path = "path_of_verity_directory"

  language = "English" or "German" or "Finnish" or "French" or "Danish"

  or "Dutch" or "Italian" or "Norwegian" or "Portuguese" or "Spanish"

  or "Swedish"> 

See also

cfexecute, cfindex, cfgraph, cfobject, cfreport, cfsearch, cfservlet, cfwddx

Attributes

Attribute
Description
action
Required. Specifies the action to perform:
  • create    Creates a collection using the specified path and optionally specified language.
  • repair    Fixes data corruption in a collection.
  • delete    Destroys a collection.
  • optimize    Purges and reorganizes data for efficiency.
  • map    Assigns an alias to an existing collection.
collection
Required. Specifies a collection name or an alias if action = "map"
path
Required for create and map. Specifies a path to the Verity collection. The effect of the path attribute depends on the action that you specify:
  • create creates a directory for Verity. The path is composed of the directory path specified in the path attribute, with the name specified in the collection attribute appended to it. Thus, the full directory path is "path_name\collection_name\." For example, if the pathname is "C:\Col\," and the collection name is "myCollection," the full directory path is "C:\Col\myCollection\."
  • map provides a name with which ColdFusion can reference an existing collection. The name is specified with the collection attribute. It is an alias for the collection, which can be used in cfindex, and to reinstate a collection after you re-install ColdFusion. The directory path specified with the path attribute is the full pathname of the Verity directory. Therefore, to reference the directory created in the previous example, specify "C:\Col\myCollection\."
language
Optional for create. To use the language attribute you must have the ColdFusion International Search Pack installed. Options are:
  • English (default)
  • German
  • Finnish
  • French
  • Danish
  • Dutch
  • Italian
  • Norwegian
  • Portuguese
  • Spanish
  • Swedish

Usage

cfcollection works only at the collection level. To add content to a collection, use cfindex.

Note the following regarding mapped collections:

Example

<!--- This example shows the basic functionality

of the cfcollection tag (create, repair, optimize, delete) --->

<html>

<head>

  <title>cfcollection</title>

</head>

<body bgcolor = silver>

<H3>cfcollection</h3>



<!--- see if a collection name has been specificied ... --->

<cfif IsDefined("form.CollectionName") AND

IsDefined("form.CollectionAction")>

  <cfif form.CollectionName is not "">

    <cfoutput>

    <cfswitch expression = #form.CollectionAction#>

     <cfcase value = "Create">

      <cfcollection action = "create"

       collection = "#form.CollectionName#"

       path = "C:\CFUSION\Verity\Collections\">

      <H3>Collection created.</H3>

     </cfcase>

     <cfcase value = "Repair">

      <cfcollection action = "repair"

       collection = "#form.CollectionName#">

      <H3>Collection repaired.</H3>

     </cfcase>

     <cfcase value = "Optimize">

      <cfcollection action = "optimize"

       collection = "#form.CollectionName#">

      <H3>Collection optimized.</H3>

     </cfcase>

     <cfcase value = "delete">

      <cfcollection action = "delete"

       collection = "#form.CollectionName#">

      <H3>Collection deleted.</H3>

     </cfcase>

    </cfswitch>

...



Banner.Novgorod.Ru