Guillaume Differenthink
2007-Sep-06 21:53 UTC
[Ferret-talk] Find by contents and missing ferret_score method
Hi, i m using acts as ferret via the find_by_contents, and then i my trying to get the score of each results... But the score of ferret_score method is missing... I ve got the @total_hits in the array, but not the @score one :/ What s going on ? Is this method disappear in acts_as_ferret ? thanks Guillaume. -- Posted via http://www.ruby-forum.com/.
Doug Smith
2007-Sep-06 22:24 UTC
[Ferret-talk] Find by contents and missing ferret_score method
You''re looking for "ferret_score". Each object returned by find_by_contents has that method available. Thanks, Doug On 9/6/07, Guillaume Differenthink <moigg2000 at yahoo.fr> wrote:> Hi, > > i m using acts as ferret via the find_by_contents, and then i my trying > to get the score of each results... > But the score of ferret_score method is missing... > > I ve got the @total_hits in the array, but not the @score one :/ > > What s going on ? > Is this method disappear in acts_as_ferret ? > > thanks > > Guillaume. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >
Guillaume Differenthink
2007-Sep-06 22:45 UTC
[Ferret-talk] Find by contents and missing ferret_score method
Well my problem is that there is not :/ I can assure you !!! i do : @videos = Video.find_by_contents(mystuff) and then if i do for video in @video video.ferret_score end i get : undefined method `ferret_score'' for #<Video:0x324ef5c> any clues ? Thanks for you reply -- Posted via http://www.ruby-forum.com/.
Doug Smith
2007-Sep-06 23:49 UTC
[Ferret-talk] Find by contents and missing ferret_score method
Well, the very similar code works for me. What version of things are you using? I''m using: Ruby 1.8.6 Rails 1.2.3 Ferret 0.11.4 acts_as_ferret 0.4.1 Thanks, Doug On 9/6/07, Guillaume Differenthink <moigg2000 at yahoo.fr> wrote:> Well my problem is that there is not :/ > > I can assure you !!! > i do : > > @videos = Video.find_by_contents(mystuff) > > and then if i do > for video in @video > video.ferret_score > end > > i get : undefined method `ferret_score'' for #<Video:0x324ef5c> > > any clues ? > > Thanks for you reply > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >
Guillaume Differenthink
2007-Sep-07 07:20 UTC
[Ferret-talk] Find by contents and missing ferret_score method
FOUND THE PROBLEM !!! Do not use acts_as_ferret gem !!!!.. thanks doug.. Doug Smith wrote:> Well, the very similar code works for me. What version of things are > you using? I''m using: > > Ruby 1.8.6 > Rails 1.2.3 > Ferret 0.11.4 > acts_as_ferret 0.4.1 > > Thanks, > > Doug-- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Sep-07 09:04 UTC
[Ferret-talk] Find by contents and missing ferret_score method
On Fri, Sep 07, 2007 at 09:20:18AM +0200, Guillaume Differenthink wrote:> FOUND THE PROBLEM !!! > > Do not use acts_as_ferret gem !!!!..this should work with the gem, too, if you have the most recent version (0.4.1) of it installed. 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 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa