|
Re: AAF - Stem Analyzer: msg#00039lang.ruby.ferret.general
On Wed, Dec 06, 2006 at 01:46:38PM -0800, Matt Schnitz wrote: > I'm not on AAF. Can someone else help Raymond with an example? > > On 12/6/06, Raymond O'connor > <nappin713-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: > > > >Matt Schnitz wrote: > >> You also need to stem-analyze the incoming query. > >> > >> I had this same problem. :^> > >> > >> > >> Schnitz > > > >Do you have an example of how to do this? I'm using AAF. just specify your analyzer with the :analyzer option, i.e. acts_as_ferret :analyzer => GermanStemmingAnalyzer.new Here's what my GermanStemmingAnalyzer looks like: class GermanStemmingAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = FULL_GERMAN_STOP_WORDS) @stop_words = stop_words end def token_stream(field, str) StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(str)), @stop_words), 'de') end end Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer kraemer-jv+WEUQhfkc@xxxxxxxxxxxxxxxx Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: crash on repeated search: 00039, Andreas Korth |
|---|---|
| Next by Date: | Re: Stem Analyzer: 00039, Jens Kraemer |
| Previous by Thread: | Re: AAF - Stem Analyzeri: 00039, Matt Schnitz |
| Next by Thread: | Search Multiple Models: 00039, Mark |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |