Discussion:
Indexing Service Query to Intranet?
(too old to reply)
w***@yahoo.com
2006-03-09 20:17:30 UTC
Permalink
Hi all,

how can I make it so that my intranet can just use the same form the
computer management index sercice form uses?

I don't need anything fancy, I just need it to search one directory on
my server. It works wonders when I search thru computer management, how
can I get this onto a web intranet?

thanks
Miroslav Pragl
2006-03-13 12:09:31 UTC
Permalink
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") %>&nbsp;</b></i></td>
</tr>
<% rstResults.MoveNext
Loop %>
</table>
<%

End If
SET strQuery = Nothing
Set objQuery = Nothing
Set rstResults = Nothing
End If
%>
</body>
</html>

Loading...