Indexing Services
Full reference for Indexing Services can be found searching the Microsoft MSDN website.
Below is a full example of an Indexing Services query written in VBscript.
It searches your entire site for the text contained in Request.Form("searchText")
<%
RootPath = lcase(server.MapPath("/"))
Set Q = Server.CreateObject("IXSSO.Query")
Set U = Server.CreateObject("IXSSO.Util")
Q.Catalog = "Insert your catalog name here..."
Q.Query = "(#filename *.htm* ) and " & Request.Form("searchText")
Q.Columns = "path, DocTitle, rank, FileName"
Q.Sortby = "rank"
U.AddScopeToQuery Q, RootPath,"deep"
on error resume next
set RS = Q.CreateRecordSet("sequential")
on error goto 0
if isObject(RS) then
if RS.EOF then
response.write "No results!"
else
do while not RS.EOF
response.write "<A HREF='" & replace(RS("path"),RootPath,"") & "'>"
response.write RS("DocTitle")
response.write "</A><BR>"
RS.MoveNext
loop
end if
else
Response.Write "Search contains only ignored words."
end if
Set RS = Nothing
Set U = Nothing
Set Q = Nothing
%>
Click here to return to the previous page.
|