Limit search scope to include all subirectories

thesteve
Posts: 54
Joined: Wed Jan 24, 2001 8:17 pm

Limit search scope to include all subirectories

Post by thesteve »

Hi!

Topic: multiple data bases and limiting search scope

I have created a single data base that includes 3 different TOPICS in three corresponding subdirectories.

The site is laid out as follows:
I have these three topics, for example with models below each major subdirectory:
EXAMPLE:
==============
www.auto.com/cars/
/cars/gm/
/cars/ford/
/trucks/
/trucks/Toyota/
/trucks/dodge/
/boats/
/boats/sail/
/boats/motor/
/boats/canoes/

Ok you get the basic idea.

I already have a single data base that will search all these pages at once.

MY QUESTION:
Can I limit a search to a single directory and to automatically include all subdirectories.

Lets say I want to search for cars only.

The directory structure I want to search is this: (a fictitious example for simplicity sake)

www.autos.com/cars/
www.autos.com/cars/gm/
www.autos.com/cars/gm/lumina/
www.autos.com/cars/ford/
www.autos.com/cars/ford/mustang/
www.autos.com/cars/toyota/
www.autos.com/cars/toyota/camry/

Now in reality there are perhaps 150 different subdirectories.

QUESTION #2:
Is there a command to either create and index a separate data base: 1. cars 2. boat 3. trucks

or would it be better to create one large data base and limit the search to a single directory that INCLUDES automatically, all subdirectories.

I want to be able to search separately for 1. cars 2. boat 3. trucks.

Thanks!

Steve
thesteve
Posts: 54
Joined: Wed Jan 24, 2001 8:17 pm

Limit search scope to include all subirectories

Post by thesteve »

Thanks, I had already looked at 2 of those pages. I read carefully and came up with this, but it still doesn't isolate the results to a specific subdirectory. I want to have radio button options for up to 10 subdirectories.

No matter which radio button I select the results are the same!

Here is the form:
================

<FORM METHOD=get ACTION="/cgi-bin/texis/webinator/newsearch/">
<INPUT TYPE=hidden NAME=db VALUE="db">
<blockquote><B><FONT FACE="Arial" SIZE=4>Search for this:<br>

<INPUT SIZE=40 name=query value=""></font><BR>

<input type=radio name=path value="www.bible.ca%" checked> Search Whole Site<br>
<input type=radio name=path value="www.bible.ca/eo%"> Search Executible Oulines only<br>
<input type=radio name=path value="www.bible.ca/tracks%"> Search evolution only<br>
<input type=radio name=path value="www.bible.ca/maps%"> Search maps only<br>

<INPUT TYPE=submit name=submit VALUE="Submit">

</FORM>

Thanks
Steve
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Limit search scope to include all subirectories

Post by mark »

Did you modify the search script to search for $path? As in
"and Url matches $path". The default search script already has a "Url matches $uq". If you change your variable name to uq instead of path it should work automatically without mods.

For "whole site" should use a value of "" which will cause the matches portion of the query to be dropped, making the search more efficient.
thesteve
Posts: 54
Joined: Wed Jan 24, 2001 8:17 pm

Limit search scope to include all subirectories

Post by thesteve »

Thanks Mark! I merely changed the "path" to "uq

I changed this:
<input type=radio name=path value="www.bible.ca/maps%"> Search maps only

to this:
<input type=radio name=uq value="www.bible.ca/maps%"> Search maps only

AND IT WORKS WITH THE DEFAUL INSTALL!

Here is the HTML for the search page:

<FORM METHOD=get ACTION="/cgi-bin/texis/webinator/newsearch/">
<INPUT TYPE=hidden NAME=db VALUE="db">
<blockquote><B><FONT FACE="Arial" SIZE=4>Search for this:<br>

<INPUT SIZE=40 name=query value=""></font><BR>

<input type=radio name=uq value="www.bible.ca%" checked> Search Whole Site<br>
<input type=radio name=uq value="www.bible.ca/eo%"> Search Executible Oulines only<br>
<input type=radio name=uq value="www.bible.ca/tracks%"> Search evolution only<br>
<input type=radio name=uq value="www.bible.ca/maps%"> Search maps only<br>

<INPUT TYPE=submit name=submit VALUE="Submit">

</FORM>

Thanks!
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Limit search scope to include all subirectories

Post by mark »

Don't forget to change
<input type=radio name=uq value="www.bible.ca%" checked> Search Whole Site<br>
to
<input type=radio name=uq value="" checked> Search Whole Site<br>
for efficiency.
anders.rask
Posts: 11
Joined: Thu Sep 06, 2001 4:38 am

Limit search scope to include all subirectories

Post by anders.rask »

I am using Webinator 4, isnt this the same functionality that is called "categories" in Webinator 4 ($cq)?

If not, what is the difference?

regards
Anders
bart
Posts: 251
Joined: Wed Apr 26, 2000 12:42 am

Limit search scope to include all subirectories

Post by bart »

Yes, its the same as categories in Webinator 4.
thunderstone13
Posts: 3
Joined: Mon Jan 27, 2003 4:40 pm

Limit search scope to include all subirectories

Post by thunderstone13 »

So uq is no more possible in Webinator 4?

It's not the same. With uq the client can limit the search scope at run time to whatever directory he likes.
cq categories need to be defined in the administration section.
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

Limit search scope to include all subirectories

Post by mark »

uq is still present in webinator 4.
Post Reply