
481
DEVELOPING
COLDFUSION 9 APPLICATIONS
Accessing and Using Data
Las
t
upda
te
d 8/5/2010
You can register collections in the ColdFusion Administrator or by creating a collection with the
cfcollection
tag.
If you register a given collection with ColdFusion and you specify a
language
attribute, you do not have to specify the
language
attribute when using
cfindex
and
cfsearch
tags for that collection. If you do not register a given collection
with ColdFusion, ColdFusion uses English (Basic), the default language, unless you specify the language in the
language
attribute for the
cfindex
and
cfsearch
tags for that collection.
Note:
When you search a collection in a language other than English, translate operators such as AND and OR into the
language of the collection.
Creating a search tool for ColdFusion applications
The three main tasks in creating a search tool for your ColdFusion application are:
1
Create a collection.
2
Index the collection.
3
Design a search interface.
You can perform each task programmatically—that is, by writing CFML code. Alternatively, you can use the
ColdFusion Administrator to create and index a collection.
Creating a collection with the ColdFusion Administrator
Use the following procedure to quickly create a collection with the ColdFusion Administrator:
1
In the ColdFusion Administrator, select Data & Services > Verity Collections.
2
Enter a name for the collection; for example, DemoDocs.
3
Enter a path for the directory location of the new collection, for example, C:\CFusion\verity\collections\.
By default in the server configuration, ColdFusion stores collections in
cf_root
\verity\collections\ in Windows and
in
cf_root
/verity/collections on UNIX. In the multiserver configuration, the default location for collections is
cf_webapp_root
/verity/collections. In the J2EE configuration, the default location for collections is
verity_root
/verity/collections, where
verity_root
is the directory in which you installed Verity.
Note:
This is the location for the collection, not for the files that you search.
4
(Optional) Select a language other than English for the collection from the Language drop-down list.
Norwegian
norwegian
Norwegian (Bokmal)
bokmal
Norwegian (Nynorsk)
nynorsk
Polish
polish
Portuguese
portuguese
Russian
russian
Spanish
spanish
Swedish
swedish
Turkish
turkish
Multiple languages
uni
Language
Language attribute