Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:307] limit search to subdirectories?

From: Roy Tennant <rtennant(at)>
Date: Tue Jun 02 1998 - 22:22:56 GMT
On Tue, 2 Jun 1998 wrote:

> Alternatively, has anyone modified the output script so that swish would
> search all of (using above example), but only display hits
> in thisstuff or thatstuff (according to what I pass the script)? That
> should do it, though inefficiently, since it would search through lots 
> of stuff it would never display.

I've just implemented a script on SunSITE that takes the SWISH-E output,
sorts the hits on the top-level directory, then translates the top-level
directory into an understandable phrase (from a file of format
"directoryname::phrase") and indents all the hits from that directory
under it. It would be trivial to ignore the hits from directories other
than that in which you were interested. 

It does something else that you may find interesting. On the first pass it
automatically limits the search terms to words found in the TITLE tag. If
it finds some results, it stops there and processes the output, putting a
button at the bottom of the screen that says "Try to find more on
'search'" (where 'search' are your search words). Pressing that button
will perform the search looking for the words in any header (H1 to H6)
tags. Again, if it finds results it processes the results and puts a
button at the bottom offering more. The final time it looks for the words
in the body of the document. In any of those iterations, if the search
returns no items it fails over to the next kind of search until it hits
bottom. You can see this in operation by going to:


and searching on "metadata". Then click the buttons on the bottom.

You can do just about anything you want with the search results as long as
you're willing to burn cycles. I'm of the opinion that cycles don't do you
a bit of good unless you're burning them. 
Roy Tennant
Received on Tue Jun 2 15:30:25 1998