Adobe COLDFUSION 9 Manual page 523

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
Year
Place
1990
Utah
1990
Oregon
1991
Utah
1991
Oregon
1992
Utah
The following application page matches records that have 1990 in the TEXT column and are in the Place Utah. The
search operates on the collection that contains the TEXT column and then narrows further by searching for the string
Utah in the CF_TITLE document field. Document fields are defaults defined in every collection corresponding to the
values that you define for URL, TITLE, and KEY in the
<cfquery name="GetText"
datasource="TEST1">
SELECT Year || Place AS Identifier, text
FROM YearPlaceText
</cfquery>
<cfindex collection="testcollection"
action="Update"
type="Custom"
title="Identifier"
key="Identifier"
body="TEXT"
query="GetText">
<cfsearch name="GetText_Search"
collection="testcollection"
type="Explicit"
criteria="1990 and CF_TITLE <SUBSTRING> Utah">
<cfoutput>
Record Counts: <br>
#GetText.RecordCount# <br>
#GetText_Search.RecordCount# <br>
</cfoutput>
Query Results --- Should be 5 rows <br>
<cfoutput query="Gettext">
#Identifier# <br>
</cfoutput>
Search Results -- should be 1 row <br>
<cfoutput query="GetText_Search">
#GetText_Search.TITLE# <br>
</cfoutput>
Evidence operators
Evidence operators let you specify a basic word search or an intelligent word search. A basic word search finds
documents that contain only the word or words specified in the query. An intelligent word search expands the query
terms to create an expanded word list so that the search returns documents that contain variations of the query terms.
Documents retrieved using evidence operators are not ranked by relevance unless you use the MANY modifier.
Text
Text about Utah 1990
Text about Oregon 1990
Text about Utah 1991
Text about Oregon 1991
Text about Utah 1992
tag.
cfindex
Last updated 8/5/2010
518

Advertisement

Table of Contents
loading

Table of Contents