We have a small intranet site that has a bunch of .htm files and has been
using Frontpage search. Due to some changes, we want to switch to using
index service and to limit the scope of the search.
The docs are organized in directories and I'd like to limit the scope of the
search to the directory of the search page or below. I have the results.asp
page in each high level directory, but I'm having problems limiting the
search.
Using ixsso.query I've tried using this
filepath="*\this_directorty\*"
q.query=searchstring & " & #path " & filepath
This works fine however, but I have to hard-wire the directory within .asp.
So, I want to derive the directory info from the SCRIPT_NAME servervariable.
I've tried removing the filename portion of the script_name and passing that
as
lsPath = Request.ServerVariables("SCRIPT_NAME")
arPath = Split(lsPath, "/")
arPath(UBound(arPath,1)) = ""
filepath = Join(arPath, "/")
q.query=searchstring & " & #path " & filepath ' regex search
as well as:
q.query=searchstring & " & @path " & filepath ' non-regex
Both return zero results
Last thing I tried was limiting the scope using ixsso.util
set util=server.createobject("ixsso.util")
util.AddScopeToQuery q, filepath, "deep"
q.query=searchstring
This too returns zero results for the same search string.
I suspect there is a trivial answer but I've not found it.
Thank you
\\Greg
Dim strPathInputCourseName
'below, get the value passed from the form (I used a drop down in the
form to select the appropriate parent folder)
strPathInputCourseName = Request.QueryString("strPathInputCourseName")
Set objUtility = Server.CreateObject("IXSSO.Util")
'below, plug the selected directory into the search scope
objUtility.AddScopeToQuery objQuery, "c:\web_shares\amslecturenotes
\"&strPathInputCourseName, "deep"
Hope this helps!
Louis