The Form Page:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>The Query and Utility Objects</title>
<meta name="Microsoft Theme" content="clearday 101, default">
<meta name="Microsoft Border" content="tl, default">
</head>
<body>
<h2>Using the Query and Utility Objects</h2>
<p>In the following box, please identify any
words you wish to search for, and that appear
in the content of the article you want to locate.</p>
<form method="post" action="query_Test.asp">
Locate articles that contain the following text:
<input type="text" name="SearchString" value="Mukilteo" size="40"><p>
Limit results to the following:<br>
<input type="radio" value="Days" checked name="Limit">
Those published in the last
<input type="text" name="Days" value="180" size="10"> days.<br>
<input type="radio" name="Limit" value="Hours">
Those published in the last
<input type="text" name="Hours" size="10"> hours.<p>
Directory to be searched:
<input type="text" name="Scope" value = "/TestNet/DocDirSubweb" size="50"><p>
<input type="submit" value="Search" name="Action">
</form>
</body>
</html>

The ASP Display Page:
<%
'Create the query based on user input
If Request("SearchString") <> "" Then
Query = "@contents " & Request("SearchString") & " and "
End If
If Request("Limit") = "Days" Then
Query = Query & " @write > " & "-" & Request("Days") & "d"
Else
Query = Query & " @write > " & "-" & Request("Hours") & "h"
End If
Set objQuery = Server.CreateObject("ixsso.Query")
objQuery.Query = Query
'objQuery.Catalog = "TestNet100040Catal"
objQuery.Catalog = "f:\IndexServer Cats\100040TestNetCat"
objQuery.MaxRecords = 100
objQuery.SortBy = "filename[d]"
objQuery.Columns = "vpath,path,filename,size,write, DocCategory,DocTitle,DocAuthor,DocKeywords"
If Request("Scope") <> "" Then
Set objUtil = Server.CreateObject("ixsso.util")
objUtil.AddScopeToQuery objQuery, Request("Scope"), "shallow"
End If
Set objRS = objQuery.CreateRecordset("nonsequential")
If objRS.EOF Then
Response.Write("No records found!")
Response.End
End If
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Search Results</title>
<meta name="Microsoft Theme" content="clearday 101, default">
<meta name="Microsoft Border" content="tl, default">
<body>
<h1>Search Results</h1>
<table border="1" width="100%">
<% do while not objRS.EOF%>
<tr>
<td width="20%" align="right"><b>URL to File:</b></td>
<td width="80%"><a href="<%=
objRS("vPath")%>"><%= objRS("Filename")%></a></td>
</tr>
<tr>
<td width="20%" align="right"><b>Virtual Path:</b></td>
<td width="80%"><%= objRS("vPath")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Physical Path:</b></td>
<td width="80%"><%= objRS("Path")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Filename:</b></td>
<td width="80%"><%= objRS("Filename")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Size:</b></td>
<td width="80%"><%= objRS("Size")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Last Modified:</b></td>
<td width="80%"><%= objRS("Write")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Category:</b></td>
<td width="80%"><%= objRS("DocCategory")%></td>
</tr>
<tr>
<td width="20%" align="right"><b>Keywords:</b></td>
<td width="80%"><%= objRS("DocKeywords")%></td>
</tr>
<% objRS.MoveNext %>
<% Loop %>
</table> </body>
</html>