Max Williams
2008-Jun-13 12:43 UTC
[Ferret-talk] strip out non-alphanumeric characters before saving to index
Does anyone know a simple way, with ferret or a_a_f, to strip out everything that''s not a letter, number or space before saving to the index? I know that i could do a custom method for every indexed field that regexes them out but i thought that there might be a universal option for it... thanks max -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2008-Jun-16 11:50 UTC
[Ferret-talk] strip out non-alphanumeric characters before saving to index
Hi! That''s a typical job for an analyzer, I think Ferret''s StandardAnalyzer which is used by default does exactly that. If not, try RegexpAnalyzer. Cheers, Jens On Fri, Jun 13, 2008 at 02:43:47PM +0200, Max Williams wrote:> Does anyone know a simple way, with ferret or a_a_f, to strip out > everything that''s not a letter, number or space before saving to the > index? I know that i could do a custom method for every indexed field > that regexes them out but i thought that there might be a universal > option for it... > > thanks > max > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-- 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold
Max Williams
2008-Jun-16 11:58 UTC
[Ferret-talk] strip out non-alphanumeric characters before saving to index
great, i''ll check those out. thanks! max 2008/6/16 Jens Kraemer <kraemer at webit.de>:> Hi! > > That''s a typical job for an analyzer, I think Ferret''s StandardAnalyzer > which is used by default does exactly that. If not, try RegexpAnalyzer. > > Cheers, > Jens > > On Fri, Jun 13, 2008 at 02:43:47PM +0200, Max Williams wrote: > > Does anyone know a simple way, with ferret or a_a_f, to strip out > > everything that''s not a letter, number or space before saving to the > > index? I know that i could do a custom method for every indexed field > > that regexes them out but i thought that there might be a universal > > option for it... > > > > thanks > > max > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Ferret-talk mailing list > > Ferret-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ferret-talk > > > > -- > 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 > kraemer at webit.de | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ferret-talk/attachments/20080616/80e31ed0/attachment.html>