To use Query of Queries with a Verity record set:
Create a ColdFusion page with the following content:
1
<html>
<head>
<title>QoQ and Verity</title>
</head>
<body>
<!--- master query: retrieve all documents from the bbb collection
that contain 'film' (or its stemmed variants); change values for
collection and criteria as needed for your Verity collection --->
<cfsearch name = "quick"
collection="bbb"
type = "simple"
criteria="film">
<h3>Master query dump:</h3>
<cfdump var="#quick#">
<!--- detail query: retrieve from the master query only those
documents with a score greater than a criterion (here,
0.7743) --->
<cfquery name="qoq" dbtype="query">
SELECT * from quick
WHERE quick.score > 0.7743
</cfquery>
<h3>Detail query dump:</h3>
<cfdump var="#qoq#">
</body>
</html>
Save the page as qoq_verity.cfm in the myapps directory under the web_root.
2
In your web browser, enter the following URL to display the query results:
3
http://127.0.0.1/myapps/qoq_verity.cfm
The following figure shows how the output appears:
Note: This figure shows a collapsed master query output and an expanded detail query output.
Click an output to expand or collapse it.
460
Chapter 22: Using Query of Queries
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers