Gilles Detillieux (firstname.lastname@example.org)
Fri, 30 Apr 1999 12:42:45 -0500 (CDT)
According to eli wendkos:
> Next question for you... I want my users to be able to preselect any of 3
> keywords when performing a search on my site. I've updated the html form
> to include <select name=htdig-keywords> and then the <options> for the
> Additionally, I added the keyword attribute to my config file.
What do you mean by the keyword attribute? If you mean
keywords_meta_tag_names, this only affects digging, not searching.
> I deleted the db's and reindexed, and now the problem is that htsearch
> does not add my predetermined keywords to the $words string.
> I know that the keyword in conjunction with any search term works,
> because I tried it through the regular $words input text field.
Yes, this words because if you set things up correctly for htdig, it will
add all your keywords from htdig-keywords meta tags to the database.
However, htdig-keywords is not a recognized input parameter in htsearch.
If you define it in your search form, htsearch will simply ignore it.
There is an input parameter called simply "keywords", which htsearch
recognises. It doesn't get added to the $words field, but it restrict
search results to pages that contain those words. That's probably
what you want to use.
I've noticed that there's a problem with the way this keywords input
parameter is handled: it doesn't seem to get passed onward for follow-up
searches, so it'll only work for searches from the original search form
that defines the parameter. This is something I plan to fix in 3.2.
> Of course, it works best boolean - so if there's a way to get a boolean
> preset as well, that would be great.
All you need to do is add "<option value=boolean>Boolean" to the method
select list in your search.html. I don't know why the sample form that
gets installed doesn't include this option, but my guess is that for
simple sites it introduces another level of complexity, which some may
not want to bother with.
-- Gilles R. Detillieux E-mail: <email@example.com> 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 firstname.lastname@example.org containing the single word "unsubscribe" in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Fri Apr 30 1999 - 10:52:17 PDT