Below is the code that does the index, and the cfsearch code that reads
The index:
<cfquery name="Qryname" datasource="dsnnane">
SELECT id, eid, title
FROM tbl1
</cfquery>
<cfindex
query="Qryname"
collection="events"
action="Update"
type="Custom"
title="title"
key="id"
body="eid,title">
Search Results
<cfsearch
collection="events"
name="Qryname"
criteria="#Form.Criteria#">
<!--- Output the record set. --->
<cfoutput>
Your search returned #Qryname.RecordCount# result(s).
</cfoutput>
<cfoutput query="Qryname">
<a href="page.cfm?eid=#eid#">#title#</a>
</cfoutput>
The problem is that I can only output the column which I specified as the title in cfindex. If I try to output any other column other than that which I specified as the title, the system says that the var is undefined.
In this case it says that eid is undefined.
I see in the documentation that the column values can be output
Please see part 3 in "Search and display the query results", which is under "Indexing data returned by a query"
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7b35.html
Any ideas?
Thank you.