choosing search scope

jdryden
Posts: 5
Joined: Mon Aug 27, 2001 11:20 am

choosing search scope

Post by jdryden »

I've attempted to limit my search scope of Webinator to a specific departmental subdirectory of my index. I used the method you've explained in a previous postings, that is to use a hidden "path" form variable to limit the URL for the directory that is to be searched. This results in a retrieval that matches the scoped directory, but the retrieval still contains hits from the entire database. In other words, the result is that the correct directory hits are "ranked" above everything else, instead of being exclusive search results. Does this make sense? I've also used the "uq" variable name with the same results.

thanks,
Jim
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

choosing search scope

Post by mark »

We'll need more detail about what you've done. If you're using the standard script and set uq you should never get any pages that don't match it. How are you setting uq? What are you setting it to? What's an example of a page it's returning that it shouldn't?

I assume you've read this thread?:
http://thunderstone.master.com/texis/ma ... 3a70ace610
which pretty well covers it.
jdryden
Posts: 5
Joined: Mon Aug 27, 2001 11:20 am

choosing search scope

Post by jdryden »

OK,

"Path" is a hidden form input in my search form:
... <tr><td><input type=hidden name=path value="www2.lib.ukans.edu/~instruction%">...

In Main, the SQL statement features includes path this way:
...<SQL ROW SKIP=$jump MAX=10
"select 'http://' + Url Url, Depth, Title, Body, length(convert(Body,'varchar')) Size,
id, $$rank r
from html
where Title\Meta\Body likep $q
and Title like $tq ...
and Url matches $path
and Depth <= $dq

The URL for my form that is built without scope limiting is:
http://www.lib.ku.edu/cgi-bin/texis/search/search-pub/

The URL for my "limit scope" form is:
http://www.lib.ku.edu/cgi-bin/texis/sea ... ch-pubfoo/

thanks,
jim
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

choosing search scope

Post by mark »

I searched for "tool" and it properly limited the search to your specified directory. What specific problem are you seeing?
jdryden
Posts: 5
Joined: Mon Aug 27, 2001 11:20 am

choosing search scope

Post by jdryden »

If you look closer, you'll see that this search does not limit results to the "/~instruction" sub-directory. You must page down and view the URL's of subsequent hits to see that Webinator is retrieving hits outside of the /~instruction sub-directory.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

choosing search scope

Post by mark »

There are only 4 matches. Paging down goes beyond the end of those hits and is apparently losing the uq setting because it's not exported. One thing the other thread left out was that you need to export uq.

<export> uq at the top of the script similarly to how query is already exported. You should also add the following to the <a name=fpar> function to ensure correct hit counts.

<if $path ne ""><$count=1></if>
jdryden
Posts: 5
Joined: Mon Aug 27, 2001 11:20 am

choosing search scope

Post by jdryden »

OK, this works. Though i'm using $path, so i modified your instructions a bit.

Thanks,
jim