<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFCOLLECTION</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFCOLLECTION</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Creates and administers Verity search engine collections. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Extensibility tags
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">Syntax</span><pre>&lt;cfcollection 
   action = &quot;action&quot;
   collection = &quot;collection_name&quot;
   path = &quot;path_to_verity_collection&quot;
   language = &quot;language&quot;
   name = &quot;queryname&quot;
categories = &quot;yes&quot; or &quot;no&quot;&gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
cfexecute, cfindex, cfobject, cfreport, cfsearch, cfwddx
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion&#160;MX&#160;7:
</p>
<ul>

<li>Removed reference to external collections. </li>

<li>Deprecated the map and repair options of the action attribute. They might not work, and might cause an error, in later releases.</li>

<li>Added categories attribute and categorylist action.</li>

<li>Added CATEGORIES, SIZE, DOCCOUNT, and LASTMODIFIED to list of variables returned by the list action.</li>

<li>Marked as obsolete the MAPPED, ONLINE, and REGISTERED variables returned by the list action.</li>
</ul>

<p>
ColdFusion&#160;MX: 
</p>
<ul>

<li>Changed the requirements for the action attribute: it is now required. </li>

<li>Added the action attribute list value. It is the default.</li>

<li>Changed the requirements for the action attribute value map: it is not necessary to specify the action attribute value map. (ColdFusion detects collections and creates maps collections as required.)</li>

<li>Changed acceptable collection naming: this tag accepts collection names that include spaces. </li>

<li>Changed Verity operations behavior: ColdFusion supports Verity operations on Acrobat PDF files.</li>

<li>Changed thrown exceptions: this tag can throw the SEARCHENGINE exception. </li>
</ul>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
With this tag you can create, register, and administer a Verity collection that was created by ColdFusion or by a Verity application.
</p>

<p>
The following table shows the dependence relationships among this tag's attribute values:
</p>

<p>
</p><div align="left">
<table border="1">
  <caption></caption>
  <tr align="center">    <th colspan="1" rowspan="2">&#160;</th>
    <th colspan="7" rowspan="1">&#160;</th>
</tr>
  <tr align="center">    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
    <th>&#160;</th>
</tr>
  <tr align="left">    <td><pre>collection
</pre></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
</tr>
  <tr align="left">    <td><pre>path
</pre></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>Required</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
</tr>
  <tr align="left">    <td><pre>language
</pre></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>Optional</p></td>
    <td>
<p>Optional</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
</tr>
  <tr align="left">    <td><pre>name
</pre></td>
    <td>
<p>Required</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>Required</p></td>
</tr>
  <tr align="left">    <td><pre>categories
</pre></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
</tr>
</table>
</div>
<p>
</p>

<p>
The following examples illustrate the structures returned by the categorylist action:
</p>

<p>

</p>

<p>
The list action returns the following information in a result set that contains one row per collection: 
</p>

<p>
</p><div align="left">
<table border="1">
  <caption></caption>
  <tr align="center">    <th>&#160;</th>
    <th>&#160;</th>
</tr>
  <tr align="left">    <td>
<p>CATEGORIES</p></td>
    <td><ul>

<li>yes: the collection has category support enabled.</li>

<li>no: the collection does not have category support enabled.</li>
</ul>
</td>
</tr>
  <tr align="left">    <td>
<p>CHARSET</p></td>
    <td>
<p>The character set of the collection.</p></td>
</tr>
  <tr align="left">    <td>
<p>CREATED</p></td>
    <td>
<p>The date and time that the collection was created.</p></td>
</tr>
  <tr align="left">    <td>
<p>DOCCOUNT</p></td>
    <td>
<p>The number of documents in this collection.</p></td>
</tr>
  <tr align="left">    <td>
<p>EXTERNAL</p></td>
    <td><ul>

<li>yes: the collection is external.</li>

<li>no: the collection is not external.</li>

<li>Not Found: the collection is registered but is not available in the defined path .</li>
</ul>
</td>
</tr>
  <tr align="left">    <td>
<p>LANGUAGE</p></td>
    <td>
<p>The locale setting of the collection. </p>
<p>This information is not available for K2Server collections.</p></td>
</tr>
  <tr align="left">    <td>
<p>LASTMODIFIED</p></td>
    <td>
<p>The date and time that the collection was last changed.</p></td>
</tr>
  <tr align="left">    <td>
<p>MAPPED</p></td>
    <td>
<p>Obsolete</p></td>
</tr>
  <tr align="left">    <td>
<p>NAME</p></td>
    <td>
<p>The name of the collection. </p></td>
</tr>
  <tr align="left">    <td>
<p>ONLINE</p></td>
    <td>
<p>Obsolete</p></td>
</tr>
  <tr align="left">    <td>
<p>PATH</p></td>
    <td>
<p> Absolute path to the collection. </p></td>
</tr>
  <tr align="left">    <td>
<p>REGISTERED</p></td>
    <td>
<p>Obsolete</p></td>
</tr>
  <tr align="left">    <td>
<p>SIZE</p></td>
    <td>
<p>The size of the collection, expressed in kilobytes.</p></td>
</tr>
</table>
</div>
<p>
</p>

<p>
The ColdFusion MX Administrator Verity &gt; Collections page displays the information that is returned when you use the list attribute.
</p>

<p>
If the Verity Server is not running when the list action is executed, the tag throws an error.
</p>

<p>
To determine whether a collection exists, use code, such as the following, to execute a query of queries:
</p>
<pre>&lt;cfcollection action=&quot;list&quot; name=&quot;myCollections&quot; &gt; 
&lt;cfquery name=&quot;qoq&quot; dbtype=&quot;query&quot;&gt;
select * from myCollections 
where myCollections.name = &#39;myCollectionName&#39;
&lt;/cfquery&gt; 
&lt;cfif qoq.recordcount GT 0&gt;
   &lt;!--- Collection exists ---&gt;
   &lt;cfdump var = #qoq#&gt;
&lt;/cfif&gt;
</pre>
<p>
To get a result set with values for all the collections that are registered with the Verity server, use code such as the following:
</p>
<pre>&lt;cfcollection action=&quot;list&quot; name=&quot;myCollections&quot;&gt;
&lt;cfoutput query=&quot;myCollections&quot;&gt;
   #name#&lt;br&gt;
&lt;/cfoutput&gt;
</pre>
<p>
To add content to a collection, use cfindex. To search a collection, use cfsearch.
</p>

<p>
The language attribute of this tag supports the following options: 
</p>

<p>
</p><div align="left">
<table border="1">
  <caption></caption>
  <tr align="left">    <td colspan="4" rowspan="1">
<p>Asian Language Pack</p></td>
</tr>
  <tr align="left">    <td>
<p>Japanese</p></td>
    <td>
<p>Korean</p></td>
    <td>
<p>Chinese </p></td>
    <td>
<p>Traditional Chinese</p></td>
</tr>
  <tr align="left">    <td colspan="4" rowspan="1">
<p>Multilanguage Language Pack</p></td>
</tr>
  <tr align="left">    <td>
<p>Unicode</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
    <td>
<p>&#160;</p></td>
</tr>
  <tr align="left">    <td colspan="4" rowspan="1">
<p>Western European Language Pack</p></td>
</tr>
  <tr align="left">    <td>
<p>Bokmal</p></td>
    <td>
<p>Finnish</p></td>
    <td>
<p>Italian</p></td>
    <td>
<p>Spanish</p></td>
</tr>
  <tr align="left">    <td>
<p>Danish</p></td>
    <td>
<p>French</p></td>
    <td>
<p>Nynorsk</p></td>
    <td>
<p>Swedish</p></td>
</tr>
  <tr align="left">    <td>
<p>Dutch</p></td>
    <td>
<p>German</p></td>
    <td>
<p>Portuguese</p></td>
    <td>
<p>&#160;</p></td>
</tr>
  <tr align="left">    <td colspan="4" rowspan="1">
<p>Eastern European/Middle Eastern Language Pack</p></td>
</tr>
  <tr align="left">    <td>
<p>Arabic</p></td>
    <td>
<p>Greek</p></td>
    <td>
<p>Polish</p></td>
    <td>
<p>Turkish</p></td>
</tr>
  <tr align="left">    <td>
<p>Bulgarian</p></td>
    <td>
<p>Hebrew</p></td>
    <td>
<p>Russian</p></td>
    <td>
<p>&#160;</p></td>
</tr>
  <tr align="left">    <td>
<p>Czech</p></td>
    <td>
<p>Hungarian</p></td>
    <td>
<p>Russian2</p></td>
    <td>
<p>&#160;</p></td>
</tr>
</table>
</div>
<p>
</p>

<p>
The default location of Verity collections is as follows:
</p>
<ul>

<li>Server configuration:</li>
<ul>

<li>Windows: C:\CFusionMX7\verity\collections</li>

<li>UNIX system: /opt/coldfusionmx7/verity/collections</li>
</ul>

<li>J2EE configuration: webapp_root/WEB-INF/cfusion/verity/collections</li>
</ul>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!-------------------------------------------------------------------------
(coll_actn.cfm)
Check for server platform and use its default Verity Collection directory.
If you did not install ColdFusion MX in the default directory, or if you use
the J2EE configuration, or if your webroot is not C:\CFusionMX7\wwwroot, you
might need to change the path in this example. For example, for JRun4 the path
might be C:\JRun4\Verity\Collections\
---------------------------------------------------------------------------&gt;
&lt;cfif Find(&quot;Windows&quot;, Server.OS.Name)&gt;
   &lt;cfset collPath = &quot;C:\JRun4\Verity\Collections\&quot;&gt;
&lt;cfelse&gt;
   &lt;cfset collpath = &quot;/opt/coldfusionmx7/verity/collections/&quot;&gt;
&lt;/cfif&gt;

&lt;!--------------------------------------------------------------------------
Process form input and do the requested cfcollection operation. 
---------------------------------------------------------------------------&gt;

&lt;cfif IsDefined(&quot;form.CollectionName&quot;) AND IsDefined(&quot;form.CollectionAction&quot;)&gt;
   &lt;cfif form.CollectionName is not &quot;&quot;&gt;
      &lt;cfswitch expression=&quot;#FORM.CollectionAction#&quot;&gt;
        &lt;cfcase value=&quot;Create&quot;&gt;
          &lt;cfcollection action=&quot;CREATE&quot; collection=&quot;#FORM.CollectionName#&quot;
               path=&quot;#collPath#&quot; categories=&quot;yes&quot;&gt;
          &lt;h3&gt;Collection created.&lt;br&gt;
         Use CFINDEX to populate it.&lt;/h3&gt;
        &lt;/cfcase&gt;
        &lt;cfcase value=&quot;Repair&quot;&gt;
          &lt;cfcollection action=&quot;REPAIR&quot; collection=&quot;#FORM.CollectionName#&quot;&gt;
          &lt;h3&gt;Collection repaired.&lt;/h3&gt;
        &lt;/cfcase&gt;
        &lt;cfcase value=&quot;Optimize&quot;&gt;
          &lt;cfcollection action=&quot;OPTIMIZE&quot; collection=&quot;#FORM.CollectionName#&quot;&gt;
          &lt;h3&gt;Collection optimized.&lt;/h3&gt;
        &lt;/cfcase&gt;
        &lt;cfcase value=&quot;Delete&quot;&gt;
          &lt;cfcollection action=&quot;DELETE&quot; collection=&quot;#FORM.CollectionName#&quot;&gt;
         &lt;h3&gt;Collection deleted.&lt;/h3&gt;
        &lt;/cfcase&gt;
      &lt;/cfswitch&gt;
   &lt;cfelse&gt;
   &lt;h3&gt;Please enter a name for your collection&lt;/h3&gt;   
   &lt;/cfif&gt;
&lt;/cfif&gt;

&lt;!--------------------------------------------------------------------
(coll_form.cfm)
Form to specify the collection name and action
   coll_form.cfm
---------------------------------------------------------------------&gt;

&lt;form action=&quot;coll_actn.cfm&quot; method=&quot;POST&quot; &gt;
&lt;select name=&quot;CollectionAction&quot;&gt;
   &lt;option value=&quot;Create&quot;&gt;Create this collection
   &lt;option value=&quot;Optimize&quot;&gt;Optimize this collection
   &lt;option value=&quot;Repair&quot;&gt;Repair this collection
   &lt;option value=&quot;Delete&quot;&gt;Delete this collection
&lt;/select&gt;

&lt;p&gt;&lt;strong&gt;Collection on which to act&lt;/strong&gt;&lt;br&gt;
Use the default value or enter your own Collection name&lt;br&gt;
&lt;input type=&quot;Text&quot; name=&quot;CollectionName&quot; value=&quot;My_coll&quot;&gt;&lt;/p&gt;

&lt;input type=&quot;Submit&quot; name=&quot;&quot; value=&quot;alter or create my collection&quot;&gt;
&lt;/form&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>

<p>blue</p>

<p>10</p>

  </td>
  </tr>
  </table>
</div>

<p>green</p>

<p>3</p>

  </td>
  </tr>
  </table>
</div>

<p>magenta</p>

<p>3</p>

  </td>
  </tr>
  </table>
</div>

<p>purple</p>

<p>2</p>

  </td>
  </tr>
  </table>
</div>

  </td>
  </tr>
  </table>
</div>

<p>a/</p>

<p>10</p>

  </td>
  </tr>
  </table>
</div>

<p>a/b</p>

<p>10</p>

  </td>
  </tr>
  </table>
</div>

<p>a/b/c</p>

<p>10</p>

  </td>
  </tr>
  </table>
</div>

<p>a/b/c/subdir</p>

<p>3</p>

  </td>
  </tr>
  </table>
</div>
<div id="ACTION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">ACTION</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Required; see Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "list"

<ul>

<li>categorylist: retrieves categories from the collection and indicates how many documents are in each one. Returns a structure of structures in which the category representing each substructure is associated with a number of documents. For a category in a category tree, the number of documents is the number at or below that level in the tree.</li>

<li>create: registers the collection with ColdFusion. </li>
<ul>

<li>If the collection is present: creates a map to it.</li>

<li>If the collection is not present: creates it.</li>
</ul>

<li>delete: unregisters a collection and deletes its directories.</li>

<li>list: returns a query result set, named from the name attribute value, of the attributes of the collections that are registered by ColdFusion.</li>

<li>map: creates a map to a collection. If the action is create and the collection already exists, Coldfusion also creates a map to the collection.</li>

<li>optimize: optimizes the structure and contents of the collection for searching; recovers space. Causes collection to be taken offline, preventing searches and indexing.</li>

<li>repair: deprecated. Does nothing. </li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="COLLECTION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">COLLECTION</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">See Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">


<ul>

<li>A collection name. The name can include spaces.</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="PATH">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">PATH</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">See Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Absolute path to a Verity collection. </p>
<p>To map an existing collection, specify a fully qualified path to the collection (not including the collection name); for example, &quot;C:\MyCollections\&quot;.</p>

  </td>
  </tr>
  </table>
</div>
<div id="LANGUAGE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">LANGUAGE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">See Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "English"


<p>Although English is the default language, Englishx, a more advanced English locale, is also provided. For a list of options, see Usage. </p>
<p>Requires the appropriate (European or Asian) Verity Locales language pack.</p>

  </td>
  </tr>
  </table>
</div>
<div id="NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">See Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Name for the query results returned by the list and categorylist actions.</p>

  </td>
  </tr>
  </table>
</div>
<div id="CATEGORIES">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">CATEGORIES</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">See Usage</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "no"


<p>Used only for creating a collection:</p><ul>

<li>yes: this collection includes support for categories.</li>

<li>no: this collection does not support categories.</li>
</ul>


  </td>
  </tr>
  </table>
</div>

  </body>
</html>
