User Guide

cfindex 239
language="English"
categoryTree="vw_files/newspaper/sports"
category="Giants">
<!--- Search for any references to criteria. --->
<cfsearch
name = "mySearch"
collection = "CodeColl"
categoryTree="vw_files/newspaper/sports"
category="Giants"
criteria = "Williams"
contextpassages = "1"
maxrows = "100">
<cfoutput>
key=#mySearch.key#<br />
title=#mySearch.title#<br />
context=#mySearch.context#<br />
url=#mySearch.url#<br />
</cfoutput>
<!---EXAMPLE #3: Index a QUERY (type = "custom") using custom1. ------------>
<!--- Retrieve data from the table. --->
<cfquery name="getCourses" datasource="cfdocexamples">
SELECT * FROM COURSES
</cfquery>
<!--- Update the collection with the above query results. --->
<!--- key is Course_ID in the Courses table. ---->
<!--- body specifies the columns to be indexed for searching. --->
<!--- custom1 specifies the value of the Course_Number column. --->
<cfindex
query="getCourses"
collection="CodeColl"
action="Update"
type="Custom"
key="Course_ID"
title="Courses"
body="Course_ID,Descript"
custom1="Course_Number"
>
<h2>Indexing Complete</h2>
<!--- cno supplies value for searching custom1;
could be form input instead. --->
<cfset cno = "540">
<cfsearch
name = "mySearch"
collection = "CodeColl"
criteria = "CF_CUSTOM1 <MATCHES> #cno#"
contextpassages = "1"
maxrows = "100">
<!--- Returns indexed values (Course_ID and Descript) for
Course_Number 540. --->
<cfoutput>
key=#mySearch.key#<br />