Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Kletian #1
Combining Verity with Query of Queries
Verity is capable of very powerful text searches and indexing, but it only
returns Key, title, and decription. I'm working on an e-commerce site and for
a project I'm working on, I would like to take the query returned by cfsearch
and join it with a query of the rest of the information in the indexed
database. Doing so should allow me to search through product decription fields
in Verity, then use the list of keys to quickly gather the rest of the
information. According to documentation on Query of Queries, Joining should be
supported, yet I keep getting errors like 'Expected conditional statement'
during the statements in my Where statements. Here's what I've been doing so
far:
<html><head><title>Result</title></head>
<body>
<H1> Result </h1>
<cfsearch collection="test2" name="myq" criteria="#Form.q#" maxrows="100"
status="info" type="internet">
<cfquery name="Alldata" datasource="fooz">
Select *
From bar
</cfquery>
<cfquery name="Cross" dbtype="query">
select *
from myq INNER JOIN Alldata
ON myq.Key = Alldata.K
</cfquery>
<cfoutput>
Your search returned #Cross.RecordCount# entries.<p>
</cfoutput>
<cfoutput query="Cross">
<p><table>
<tr><td>Score: </td><td>Score</td></tr>
<tr><td>Key: </td><td>#Key#</td></tr>
<tr><td>Textfield:</td><td>#Info#</td></tr>
<tr><td>Summary: </td><td>Summary</td></tr>
</table></p>
</cfoutput>
</body></html>
I've tried some other queries like
From myq, Alldata
Where myq.Key=Alldata.K
and even
From Alldata
WHERE Alldata.k in (#ValueList(myq.Key)#)
but neither work properly. Any ideas?
Kletian Guest
-
Query of Queries - Combining Two Datasources
Problem: Query needs to combine fields from one datasource with those of another, matching on a common ID. Example: <CFQUERY... -
Query of Queries Combining Results
I have a question related to query of queries and unions/joins. Below are my two queries and the output from them. What I need to do is join the... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
combining verity collection searches
I was wondering about combining the results of two different collections and the best way to approach this. If I have 1 table which consists of 3... -
Verity - Combining Explicit Search Operators
Hi, I am trying to combine search operators but finding no examples or help in the CF documentation. Can anyone help with the proper CFSEARCH... -
Mancho00 #2
Re: Combining Verity with Query of Queries
I've found that joins can be very particular about 'Select *'. In most cases
you have to specify all of the variables you want. select myq.key as key,
myq.score as score, ..... etc. From myq, Alldata Where myq.Key=Alldata.K
Mancho00 Guest
-



Reply With Quote

