Hi,

I posted a Trac ticket about it, but I thought I'd ask the mailing  
list to reach more people.

I'm using these filters together in my analyzer (with acts_as_ferret  
+ Ferret 0.11.1).

HyphenFilter.new(
                 StopFilter.new(
                   LowerCaseFilter.new(
                     MappingFilter.new(
                                       StandardTokenizer.new(str),  
mapping)),
                   FULL_FRENCH_STOP_WORDS + FULL_ENGLISH_STOP_WORDS)
                 )

The mapping filter maps pretty much all the french accents to the  
letter without the accent. So far so good.

Only thing missing for what I want to do: I need to be able to make  
the words singular, and remove other patterns (j', d', l'). I thought  
I'd just create my own Filter that do a couple of .gsub's and add it  
in the chain.

Did any of you ever do this? If so, how?

Everytime I use my filter manually, it works very well! When I launch  
MyModel.rebuild_index, it fails randomly (works most of the time, but  
I'm sure some documents are not well indexed). It fails with messages  
like this one:

failed adding 140823996. r_analysis.c:432

Thanks for any help.

If you want to see how I've done it so far, go to http:// 
ferret.davebalmain.com/trac/ticket/168

Philippe April
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to