On Thu, Jul 05, 2007 at 11:05:36AM +0200, [EMAIL PROTECTED] wrote: > David Wennergren <[EMAIL PROTECTED]> writes: > > Hi, > > > Has anyone else experienced something similar? Any ideas how to fix it? > > Unfortunatly i've also experienced that kind of weirdness. And most of > the time it as to do with accentuation. > i'm unable to match a single é if I search for *é* (while it works > with wordwithé)
I don't know if this is acceptable for you in terms of result exactness, but you might consider replacing accentuated chars with their ascii-counterparts during analysis. > If i search for e it highlights single e, but it doesn't for single > a... wild guess - maybe this is because a is a stopword and e isn't? In general highlighting 'e' works, as does highlighting 'a', as long as you use an analyzer with empty stopword list: require 'ferret' include Ferret i = I.new :analyzer => Analysis::StandardAnalyzer.new([]) i << 'A tree in the woods' i << 'Some sentence with e' i.highlight 'a', 0, :field => :id # => ["<b>A</b> tree in the woods"] i.highlight 'e', 1, :field => :id # => ["Some sentence with <b>e</b>"] Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

