User Guide

Table Of Contents
562 Chapter 24: Building a Search Interface
Each cfsearch returns variables that provide the following information about the search:
Additionally, if you specify the
status attribute, the cfsearch tag returns the status structure,
which contains the information in the following table:
You can use search form and results pages similar to the following examples to search a collection.
criteria
The search target (can be dynamic).
maxrows The maximum number of records returned by the search. Always specify this
attribute to ensure optimal performance (start with 300 or less, if possible).
Attribute Description
RecordCount
The total number of records returned by the search.
CurrentRow
The current row of the record set.
RecordsSearched
The total number of records in the index that were searched. If no records
were returned in the search, this property returns a null value.
Summary
Automatic summary saved by the cfindex tag.
Context
A context summary that contains the search terms, highlighted in bold (by
default). This is enabled if you set the
contextpassages attribute to a
number greater than zero.
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 may produce better results.
This often contains corrected spellings of search terms. Present only when the
suggestions tag attribute criteria is met.
Keywords
A structure that contains 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 tag attribute criteria is met.
Attribute Description