According to Paul Happ:
> Version 3.1.2 running in an Earthlink shared hosting environment.
> 
> Entire site indexed in one common database.
> 
> Only concerned with a sub-directory structure of the site with directories of:
> /journal/* (a variety of subdirectories)
> 
> Including these specific directories:
> /journal/abstracts
> /journal/abstracts.97
> /journal/abstract98
> /journal/abstracts.99
> 
> I'd like one search form to only search the abstracts:
> restrict="abstracts" (I think I have this working OK. Need more testing to 
> verify)
> 
> I'd like another search form to search only the journal:
> exclude="abstracts" restrict="journal"
> (i.e. include only urls that have the string "journal" in them, but exclude 
> any url with the string "journal/abstra" in them.
> 
> I cannot get this to work. Can it be done? Are they simple text strings or 
> are they Regular Expressions? If RE's, which syntax?  Are exclude and 
> restrict mutually exclusive?

Should be doable.  There were bugs with restrict and exclude in the older
betas, but by 3.1.2 I'm pretty sure they were fixed.  I think all the bugs
in the StringMatch class were fixed by then too.  These are simple text
strings, not REs or wildcards.  The StringMatch class which is used for
these does substring matching, but allows multiple substrings in the given
patterns.  You can separate these by "|" characters in the parameter value,
or define multiple input parameter values for restrict or exclude.

I'm not sure what you mean by "mutually exclusive".  htsearch checks the
restrict parameter first, if one is given, and if the url doesn't match
it's rejected right away.  If it passes this test, then htsearch checks
the exclude parameter, if one is given, and if the url DOES match, it's
rejected, otherwise it's accepted.  So, if both restrict and exclude are
specified, the URL must match the restrict value(s) and not the exclude
value(s).

E.g.:
  <input type="hidden" name="restrict" value="journal">
  <input type="hidden" name="exclude" value="abstract">

should reject /journal/abstract98 but accept /journal/march98.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to