Verity Index (Collection)

From Hostek.com Wiki
Jump to: navigation, search

Verity Collections can be created and managed within your Coldfusion code, not just within ColdFusion Administrator.

Creating a New Collection

To create a collection, use the cfcollection tag. Also, be sure to use your own unique name instead of "CollectionName":

<cfcollection action = "create" collection = "CollectionName" path = "D:\home\yourdomain.com\path-to-collection">

Note: Put your actual domain name in place of 'yourdomain.com', then follow that by the path from you document root to the collection. Also, the following actions are available for cfcollection: categorylist, create, delete, list, map, optimize, and repair. More information about this tag can be found at Adobe's site: cfcollection documentation.

The cfindex tag allows a collection to be indexed without the need for ColdFusion Administrator:

<cfindex collection="CollectionName" action="refresh" extensions=".htm, .html, .xls, .txt, .doc"
	key="D:\home\yourdomain.com\" type="path" urlpath="D:\home\yourdomain.com\"
	recurse="Yes" language="English">

Note: Please replace 'yourdomain.com' with your actual domain name. The following actions are available for cfindex: update, delete, purge, and refresh. More information about the this tag can be found at Adobe's site: cfindex documentation.

Troubleshooting Errors

If you get an error: "collection named: Collection_Name does not exist", try the following;

a) remove any "_" and capitol letters from your "Collection_Name". For example: change

"Collection_Name"
to
"collectionname"

b) remove any "\" from end of your path. for example change;

path = "D:\home\yourdomain.com\path-to-collection\"
to 
path = "D:\home\yourdomain.com\path-to-collection"

c) change

language="English" 
to 
language="englishx"

It may also help to put your website name into the collection name, for example: "hostekcollection1"

Also for cfindex, be careful, some params work with certain other params. For example:

if type="path" THEN 
urlpath="D:\home\yourdomain.com\" and 
key="D:\home\yourdomain.com\"

HOWEVER, if type="file" THEN

urlpath="http://yourdomain.com/", and 
key="D:\home\yourdomain.com\index.cfm"