Subject: Re: [htdig] calculated keywords not finding their way from wrapper to htsearch
From: Filippo A. Salustri (firstname.lastname@example.org)
Date: Fri Oct 13 2000 - 11:18:50 PDT
As is evident from Gilles's response to my question, I wasn't clear
enough. Here's more information, which I hope will clarify matters.
I have the cgi wrapper for htsearch print out the command it is using.
open (IN, "$htsearch -c $digconf words='$query' | ")
$query expands to:
And yes, I've configured htsearch to use boolean searching.
Once again, the problem is:
1) If I use a text input field to type in the query above (of course
without the '+'s), then the query is successful. The query is correctly
reflected by the value of the $(WORDS) variable in my templates.
2) If I click on a link that causes the wrapper to create the query
string above, the query fails with the error:
Error: Expected a search word at the end
and the $(WORDS) variable which I have in my output template is the null
I have checked the value of all environment variables (from %ENV) but I
cannot find any substantive differences.
Any advice/info/help would be appreciated.
Gilles Detillieux wrote:
> According to Filippo Salustri:
> > I'm running 3.1.5, and I have a Perl wrapper around htsearch. The
> > wrapper accepts keywords which are passed directly to htsearch, or,
> > alternatively, accepts certain other box and menu selections which are
> > then 'calculated' into a list of keywords.
> > I call htsearch like this:
> > open (IN, "$htsearch -c $digconf words='$query' | ")
> > where $query is a properly formed list of keywords.
> > If I provide keywords to the wrapper, $query is properly set, htsearch
> > does its thing, and I get good results.
> > If I use the other function of the wrapper, which calculates out the
> > value of $query, nothing gets passed to htsearch (I get an error
> > indicating no keywords were provided, and in fact the value of $(WORDS)
> > in the output templates is the null string.
> > But IN BOTH CASES, $query in the call the open is correct!
> > Does anyone have any ideas on what might be going on?
> Kind of hard to guess from what you say. You state 3 times that $query is
> correct or properly set, without ever giving examples or an explanation of
> what you believe to be a proper or correct setting of this string. Are
> you aware that this string must be formatted as a CGI query string, i.e.
> using + instead of space, and hex-encoding most punctuation characters?
> If you're doing that correctly, maybe try running htsearch with one or two
> -v options and looking at your web server error logs for its error output.
> 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
-- Filippo A. Salustri, P.Eng. Department of Mechanical Engineering Ryerson Polytechnic University 350 Victoria St, Toronto, ON, M5B 2K3, Canada Tel: 416/979-5000 ext 7749 Email: firstname.lastname@example.org Fax: 416/979-5265 http://deed.ryerson.ca/~fil
------------------------------------ To unsubscribe from the htdig mailing list, send a message to email@example.com You will receive a message to confirm this. List archives: <http://www.htdig.org/mail/menu.html> FAQ: <http://www.htdig.org/FAQ.html>
This archive was generated by hypermail 2b28 : Fri Oct 13 2000 - 11:16:31 PDT