Casey Forbes
2007-Aug-08 17:36 UTC
[Ferret-talk] Filtering out low scoring matches with acts_as_ferret (fwd)
Hi all, I''m using fuzzy~ queries which can return very poor matches. What is the most elegant way to filter out scores below some threshold? I know that I can do my own thing with find_id_by_contents but I''d like to filter out less relevant results at a lower level so that I can use :limit/:offset for pagination and all that. What am I missing? Thanks, Casey
Andreas Korth
2007-Aug-09 09:12 UTC
[Ferret-talk] Filtering out low scoring matches with acts_as_ferret (fwd)
On 08.08.2007, at 19:36, Casey Forbes wrote:> I''m using fuzzy~ queries which can return very poor matches. What > is the > most elegant way to filter out scores below some threshold? I know > that I > can do my own thing with find_id_by_contents but I''d like to filter > out > less relevant results at a lower level so that I can > use :limit/:offset > for pagination and all that. > > What am I missing?You can specify a fuzziness factor after the ~. A higher factor will reduce fuzziness and thus return less but more accurate results. Example: fuzzy~0.8 Cheers, Andy