User Guide
384 Chapter 2: ColdFusion Tags
Status structure keys
To permit application users to search Verity collections for nonstandard strings, words, or
characters (for example, "AB23.45.67" or "--->") that would otherwise cause an error, you can
create a text file that lists these elements and defines their formats for Verity. Name the file
style.lex and put copies of the file in these directories:
• Windows:
■ cf_root\verity\k2\common\style (typically, cf_root = C:\CFusionMX7)
■ cf_root\verity\Data\stylesets\ColdFusionK2
• UNIX:
■ cf_root//verity/k2/common/style (typically, cf_root = /opt/coldfusionmx7)
■ cf_root/verity/Data/stylesets/ColdFusionK2
In the multiserver and J2EE configurations, you install Verity in a separate directory.
Note: To search for a character such as an angle bracket (< or >), you must use a criteria attribute
value such as
"<:" or "<:". The bracket characters are reserved in Verity, and using a backslash
to escape the character (
criteria="\<") does not work in this context. For more information, see
Chapter 25, “Using Verity Search Expressions” in ColdFusion MX Developer’s Guide.
Example
<!--- #1 (TYPE=SIMPLE) ----------------------------->
<cfsearch
name="name"
collection="snippets,syntax,snippets"
criteria="example"
maxrows = "100">
<p>
<cfoutput>Search Result total = #name.RecordCount# </cfoutput><br>
<cfoutput>
url=#name.url#<br>
key=#name.key#<br>
Variable Description
found
The number of documents that contain the search criteria.
searched
The number of documents searched. Corresponds to the recordsSearched
column in the search results.
time
The number of milliseconds the search took, as reported by the Verity K2
search service.
suggestedQuery
An alternative query, as suggested by Verity, that might produce better results.
This often contains corrected spellings of search terms. Present only when the
suggestions tag attribute criteria is met.
keywords
A structure containing each search term as a key to an array of up to five
possible alternative terms, in order of preference. Present only when the
suggestions attribute criteria is met.
keywordScore
A structure in the same format as for keywords, except it also includes Verity-
reported weighted values from 0 to .99, in which higher scores indicate better-
quality results.