Page 1 of 2

Limit search scope to include all subirectories

Posted: Wed Jan 24, 2001 8:40 pm
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

Limit search scope to include all subirectories

Posted: Thu Jan 25, 2001 10:05 am
by mark

Limit search scope to include all subirectories

Posted: Thu Jan 25, 2001 3:01 pm
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

Limit search scope to include all subirectories

Posted: Thu Jan 25, 2001 3:48 pm
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.

Limit search scope to include all subirectories

Posted: Thu Jan 25, 2001 5:08 pm
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!

Limit search scope to include all subirectories

Posted: Thu Jan 25, 2001 5:47 pm
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.

Limit search scope to include all subirectories

Posted: Mon Oct 15, 2001 9:53 am
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

Limit search scope to include all subirectories

Posted: Mon Oct 15, 2001 10:08 am
by bart
Yes, its the same as categories in Webinator 4.

Limit search scope to include all subirectories

Posted: Mon Jan 27, 2003 4:46 pm
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.

Limit search scope to include all subirectories

Posted: Mon Jan 27, 2003 4:52 pm
by mark
uq is still present in webinator 4.