Creating a Searchable Data Source
281
<hr noshade>
</body>
</html>
3
Save the file as collectionsearchaction.cfm.
4
View the file
collectionsearchform.cfm
in your browser, enter values in the
form, and then submit it.
Creating summaries
As part of the indexing process, Verity automatically produces a summary of every
document file or every query result set that gets indexed. The default summarization
selects the best sentences, based on internal rules, up to a maximum of 500
characters. Summarization information is returned by default with every
cfsearch
operation. For more information on this topic, see the Knowledge Base article
“Verity Custom1, Custom2 and Summary Fields“ (ID# 1081) at
http://www.coldfusion.com/Support/KnowledgeBase/SearchForm.cfm.
The
cfsearch
tag returns the summary for each found document in the query
variable search_query.Summary. For example, to add a summary for each search
result returned by the collectionsearchaction.cfm page, change the
cfoutput
query
tag as follows:
<cfoutput query="Search1">
<a href="#Search1.URL#">#Search1.title#</a><br>
#Summary#<br>
</cfoutput>
For information on an advanced summarization technique, see the Knowledge Base
article “Verity: Synchronizing information stored in Verity Collection” (ID# 1116) at
http://www.coldfusion.com/Support/KnowledgeBase/SearchForm.cfm.
cfsearch properties
Each
cfsearch
query object includes three variables that provide information about
the query:
•
RecordCount
The total number of records returned by the query.
•
CurrentRow
The current row of the query being processed by
cfoutput
.
•
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 of Contents for COLDFUSION 5-DEVELOPING
Page 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Page 58: ...38 Chapter 3 Querying a Database ...
Page 134: ...114 Chapter 7 Updating Your Database ...
Page 210: ...190 Chapter 10 Reusing Code ...
Page 232: ...212 Chapter 11 Preventing and Handling Errors ...
Page 238: ...218 Chapter 12 Using the Application Framework ...
Page 262: ...242 Chapter 12 Using the Application Framework ...
Page 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Page 320: ...300 Chapter 15 Indexing and Searching Data ...
Page 336: ...316 Chapter 16 Sending and Receiving E mail ...
Page 374: ...354 Chapter 18 Interacting with Remote Servers ...