here's my search in asp used for searching in pdf archive. Note name of
catalogue ("pdf" - change to yours). Also don't forget to make your files
www accessible and inform CI service about that :)
For first approach just publish directory containing indexed files using www
service, put default.asp (below) there and set is as default page.
Miroslav
<html>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="cs">
<head>
<title>PDF - Search Page</title>
</head>
<body>
<form action="default.asp" method="get">
<input type="text" name="query">
<input type="submit" value="Search">
</form>
<%
Dim strQuery ' The text of our query
Dim objQuery ' The index server query object
Dim rstResults ' A recordset of results returned from I.S.
strQuery = Request.QueryString("query")
'Server.URLEncode(Request.QueryString("query"))
If strQuery <> "" Then
Set objQuery = Server.CreateObject("ixsso.Query")
With objQuery
.Catalog = "pdf" 'name of catalogue - CHANGE !!!
.Query = strQuery
.MaxRecords = 100
.SortBy = "rank [d]"
.Columns = "filename, vpath, size, write, DocTitle"
End With
on error resume next
Set rstResults = objQuery.CreateRecordset("nonsequential")
If (Err.number <> 0) or rstResults.EOF Then
Response.Write "Sorry. No results found."
Else
%>
<table border="1">
<tr><th
align="left">Filename</th><th>Size</th><th>Date</th><th>Title</th></tr>
<%Do While Not rstResults.EOF %>
<tr>
<td align="left"><a href="<% = rstresults.fields("vpath") %>"><% =
rstresults.fields("Filename") %> </a></td>
<td><% = rstresults.fields("size") %></td>
<td><% = rstresults.fields("write") %></td>
<td><i><b><% = rstresults.fields("DocTitle") %> </b></i></td>
</tr>
<% rstResults.MoveNext
Loop %>
</table>
<%
End If
SET strQuery = Nothing
Set objQuery = Nothing
Set rstResults = Nothing
End If
%>
</body>
</html>