2009-02-06 15:47:21 UTC
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
Using ixsso.query I've tried using this
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
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
util.AddScopeToQuery q, filepath, "deep"
This too returns zero results for the same search string.
I suspect there is a trivial answer but I've not found it.