Re: [htdig] htsearch and htdig

Subject: Re: [htdig] htsearch and htdig
From: Gilles Detillieux (
Date: Tue Aug 08 2000 - 12:04:50 PDT

According to Nimesh Patel:
> I am not a great expert on your search engine but I basically want to
> restrict my search to certain directories. (Usually the directories I am
> in.)
> At the moment I have this in my HTML to do the search:
> <form method="post" action="/cgi-bin/htsearch">
> <p><b>Search News Talk:</b><br>
> <input name="words" size="15" type="text"><br>
> <input type="hidden" name="config" value="htdig">
> <input type="hidden" name="restrict" value="">
> <input type="hidden" name="exclude" value="">
> <input type="hidden" name="matchesperpage" value="10">
> <INPUT TYPE="submit" VALUE="Search">
> <br></p>
> </form>
> And it works fine returning results for all the directories on the site but
> I want to restrict it to the current directory.
> So I tried filling in the restrict field to:
> <input type="hidden" name="restrict" value="XXX">
> But when I do this with XXX as the name of the current directory e.g. dir
> which may be at http://a.b.c/dir/ it comes up with no matches found when
> there should be at least 1 match in the current directory.
> Can you please help me or tell me where I am going wrong.

Hard to say where you're going wrong when you don't give us specifics.
This should work as long as the value of the "restrict" input parameter
is a substring of URLs in your database. If by "the name of the current
directory" you mean you're using a fully qualified directory name from
your local filesystem, rather than an URL path, that may be the problem.
Using your example, if you want to restrict results to documents under
"http://a.b.c/dir/", then the XXX should be http://a.b.c/dir/ or perhaps
simply /dir/ or dir but not /usr/local/httpd/htdocs/dir, for example.

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to You will receive a message to confirm this.

This archive was generated by hypermail 2b28 : Tue Aug 08 2000 - 02:04:22 PDT