User Guide
Verity search modes in ColdFusion MX 87
Verity search modes in ColdFusion MX
Your ColdFusion MX applications can search Verity collections using two modes:
• VDK mode The default ColdFusion MX search mode. You register a collection with
ColdFusion MX by using the
cfcollection tag or by using the Verity Collections page in the
ColdFusion MX Administrator (which also uses the
cfcollection tag).
• K2 mode The high-performance K2 Server mode. Use the ColdFusion MX Administrator
Verity Server page to configure ColdFusion MX to also search using K2 Server. Once you add
the existing collections to k2server.ini and start K2 Server, the ColdFusion MX Administrator
Verity Collections page indicates these K2 Server-registered collections. For more information,
see “Using K2 Server” on page 133.
By default, unless you configure ColdFusion MX to use K2 Server, ColdFusion MX uses VDK
mode to search collections. The
cfsearch tag is functionally identical between the two modes.
For more information about the benefits and restrictions of K2 Server, see “About K2 Server”
on page 88.
For more information on using VDK mode (the default Verity search mode), see Developing
ColdFusion MX Applications.
How ColdFusion MX determines which mode to use
ColdFusion MX determines which search mode to use by examining which server (ColdFusion or
K2 Server) has registered the collection name(s) that you specified in your
cfsearch tag.
Note: You cannot combine collections registered with ColdFusion MX and with K2 Server in a single
cfsearch tag. Use two cfsearch tags to search both collection types from the same ColdFusion page.
Your server may contain several Verity collections. You can register a collection with the
ColdFusion server (for VDK mode searches) and with the K2 Server (for K2 mode searches). To
register a collection for VDK mode searches, you use a
cfcollection tag, either directly in
CFML or indirectly with the ColdFusion MX Administrator. To register a collection for K2 mode
searches, edit the k2server.ini file. For more information, see “Editing the k2server.ini file”
on page 133.
In the following example, the plants collection has been registered with ColdFusion MX and is
not listed in the k2server.ini file. ColdFusion MX uses the VDK mode to search this collection:
<cfsearch
collection="plants"
name="getData"
criteria="#form.criteria#">
In the following example, plants_al has been listed in k2server.ini and is a unique alias. That is,
the collection name, plants_al, is different than any Verity collections that are configured for use
by ColdFusion MX. ColdFusion MX uses K2 mode to search this collection:
<cfsearch
collection="plants_al"
name="getData"
criteria="#form.criteria#">
Tip: Check the Verity Collections page in the ColdFusion MX Administrator for possible naming
conflicts between collection and collection alias names. If you have a collection named plants that is
registered with ColdFusion MX, you must have a unique alias in the k2server.ini file to run a K2 mode
search.