Re: [htdig] Apache errors on keyword search


Subject: Re: [htdig] Apache errors on keyword search
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Mon Aug 14 2000 - 13:34:50 PDT


According to Tony Crockford:
> not sure this is the solution. my problem is not with meta tag keywords but
> the other htdig "keywords" used to pre load a search from the search.html
> page

I don't think Srini was referring to meta tag keywords either. The "+"
separator seems to imply CGI parameters, so I think you're on the same
wavelength, but the "+" is not required in this context.

> my understanding is that
> <input type=hidden name=keywords value="">
>
> allows the search to be pre-loaded with a word (or several) which are added
> using "and" to the words entered by the user.

Yes, this is correct.

> It works fine as long as the words entered by the user are more than 2
> characters long or not numbers or punctuation - putting a semicolon in
> returns the apache error, putting just a space returns a boolean error -
> "expected a search word at the end."

The word length is related to the setting of the minimum_word_length
config attribute, and treating bare numbers as words can be enabled via
the allow_numbers attribute. The problem seems to creep in when there
is no valid search word in the "words" input parameter. You didn't
mention which version of htsearch you were running, but there's a patch
for 3.1.5 that fixes this problem, as well as adding a new option to
make htsearch use OR rather than AND for keywords. Find it at

    ftp://sol.ccsf.cc.ca.us/htdig-patches/3.1.5/any_keywords.0

> From: Srini Sathya. [mailto:sathyas@crowndigital.com]
> > if u keyword is space separated and if u want to find 2 words
> > then u need to add a "+" between the 2 words.

That's only true when you supply the keywords as parameters within a URL.
Spaces are perfectly alright in the value field inside a search form, and
a "+" in that context would be encoded when passed as a CGI parameter so
it would remain a "+", and not get interpreted as a space, when htsearch
looks at the parameter.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
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

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



This archive was generated by hypermail 2b28 : Mon Aug 14 2000 - 03:35:30 PDT