Skip to main content.
home | support | download

Back to List Archive

SWISH::HiLiter

From: Sylvain Amrani <sylvain.amrani(at)not-real.gendarmerie.org>
Date: Wed Feb 22 2006 - 14:53:35 GMT
Hi list,

Anyone using SWISH::HiLiter here ?

I'd like to use this module, great to handle html entities (can 
PhraseHighlighting handle 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 the 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 the 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.

Secondly, I randomly get some "No more results" errors line 1639 of 
HTML::Hiliter.pm :
my @metaobj = $swish->MetaList($index);

Has anyone any idea why the MetaList call throws a "no more results" error ?

Regards,
Sylvain
Received on Wed Feb 22 06:53:38 2006