Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] ignoring accents in searches

From: Bill Moseley <moseley(at)>
Date: Mon Dec 10 2007 - 14:42:28 GMT
On Sun, Dec 09, 2007 at 04:19:38PM +0100, Louis-David Mitterrand wrote:
> When using the search form at if 
> you try après (or apres or precieuse) no highlighted word appear. For 
> some words, like père (or pere) highlighting sill happens. These 
> discrepancies didn't occur before using "TranslateCharacters :ascii7:".

Hum, I'm not sure it can work without modifying how the highlighting
code works.  I suspect it looking for apres and the text contains après
so it can't match.

It's been a long time since I looked at that module, but you can edit and enable some debugging:

    use constant DEBUG_HIGHLIGHT => 1;

That will likely generate a lot of output.  I'd probably index a very
small file to make dubbing easier.

You may need to convert each word while highlighting in the same way
that swish does when indexing.  I see there's a method in SWISH::API
called "swish_words" which is suppose to do that, but it says "Not
implemented".  You may be able to simply add a "tr ///" to translate
the characters for each $phrase.

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:

Users mailing list
Received on Mon Dec 10 09:42:31 2007