Discussion:
limiting search scope
(too old to reply)
Greg
2009-02-06 15:47:21 UTC
Permalink
Raw Message
(I recognize I'm 4-5 years late to the index service party...)

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
ll
2009-02-16 20:23:45 UTC
Permalink
Raw Message
Hi Greg,
I, too, and currently working on filtering search results with asp and
index server. Here's what I have set up to filter my 'parent' folder
contents:

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
Post by Greg
(I recognize I'm 4-5 years late to the index service party...)
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
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
ll
2009-02-16 21:32:42 UTC
Permalink
Raw Message
Greg,
Sorry, didn't read your post thoroughly enough before I replied.
Will be looking for some help for you-
Thanks,
Louis
Post by ll
Hi Greg,
I, too, and currently working on filtering search results with asp and
index server. Here's what I have set up to filter my 'parent' folder
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
Post by Greg
(I recognize I'm 4-5 years late to the index service party...)
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
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
ll
2009-02-16 22:15:23 UTC
Permalink
Raw Message
Just a thought - did you yet replace your forward slashes with
backslashes?
<%filepath=replace(filepath,"/","\")%>
I get 'no results' when these are off.. :-)
Thanks,
Louis
Post by ll
Greg,
Sorry, didn't read your post thoroughly enough before I replied.
Will be looking for some help for you-
Thanks,
Louis
Post by ll
Hi Greg,
I, too, and currently working on filtering search results with asp and
index server. Here's what I have set up to filter my 'parent' folder
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
Post by Greg
(I recognize I'm 4-5 years late to the index service party...)
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
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
Loading...