Posted on 2006-02-20 09:06:44-08 by amrani
$hiliter->setq('new query') and mod_perl
Hi,

Many thanks for this great module, very usefull in highlighting of localized and html-escaped text.

I tried to include it in my apache perl module using this schema :

$swish = SWISH::API->new('index');
$search = $swish->New_Search_Object;
$hiliter = SWISH::HiLiter->new(swish=>$swish, $query);

and in a loop :
$results = $search->Execute($query);
...
$hiliter->setq($query);
print $hiliter->light($hiliter->snip($text));

But the second call to light() fails :
* Using your swishhiliter.cgi example with two queries and hiliter calls, the second call to light() uses the first query to highlight text, despite of the setq() call
* Using your patch against the seach.cgi in a mod_perl configuration, the second call to light() falls in a endless loop.

Am I using setq() the way it is supposed to be called ? That is one HiLiter->new() with many setq() and light() ?

Now I create an new HiLiter for each new query and it works, but of course I would prefer to use the setq() way.

Regards,
Sylvain
Direct Responses: 1865 | Write a response
Posted on 2006-02-28 09:18:37-08 by amrani in response to 1823
Re: $hiliter->setq('new query') and mod_perl
all issues described here have been fixed in the 0.04 release. Thanks for your great work. Regards, Sylvain.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.