Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 495

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
4
Enter target words and click Search.
Note: As part of the indexing process, Verity automatically produces a summary of every document file or every query
recordset that gets indexed. The default summary result set column selects the best sentences, based on internal rules, up
to a maximum of 500 characters. Every
information, see
"Using Verity Search
which provides a context summary with highlighted search terms.
Enhancing search results
ColdFusion lets you enhance the results of searches by letting you incorporate search features that let users more easily
find the information they need. Verity provides the following search enhancements:
• Highlighting search terms
• Providing alternative spelling suggestions
• Narrowing searches using categories
Highlighting search terms
Term highlighting lets users quickly scan retrieved documents to determine whether they contain the desired
information. This can be especially useful when searching lengthy documents, letting users quickly locate relevant
information returned by the search.
To implement term highlighting, use the following cfsearch attributes in the search results page:
Attributes
ContextHighlightBegin
ContextHighlightEnd
ContextPassages
ContextBytes
The following example adds to the previous search results example by highlighting the returned search terms with bold
type.
Create a search results page that includes term highlighting
Create a ColdFusion page with the following content:
1
operation returns summary information by default. For more
cfsearch
Expressions" on page 505. Alternatively, you can use the context result set column,
Description
Specifies the HTML tag to prefix to the search term within the returned documents. This attribute
must be used in conjunction with ContextHighlightEnd to highlight the resulting search terms. The
default HTML tag is
, which highlights search terms using bold type.
<b>
Specifies the HTML tag to append to the search term within the returned documents.
The number of passages/sentences Verity returns in the context summary (the context column of
the results). The default value is 0; this disables the context summary.
The total number of bytes that Verity returns in the context summary. The default is 300 bytes.
Last updated 1/20/2012
490

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents