User Guide

Table Of Contents
496 Chapter 22: Using Query of Queries
To use Query of Queries with a Verity record set:
1.
Create a ColdFusion page with the following content:
<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>
2.
Save the page as qoq_verity.cfm in the myapps directory under the web_root.
3.
Display qoq_verity.cfm in your browser
The next example shows how a Query of Queries combines record sets from a
cfdirectory tag,
which is limited to retrieval of one file type per use.
To use Query of Queries to combine record sets:
1.
Create a ColdFusion page with the following content:
<html>
<head>
<title>Images Folder</title>
</head>
<body>
<h2>Image Retrieval with QoQ</h2>
<!--- set the images directory --->
<cfset dir = ("C:\pix\")>
<!--- Retrieve all GIFs --->
<cfdirectory name="GetGIF"