I just ran into a similar problem using find_by_contents through has_many relationships.
Jens' class_methods.rb Rev 187 solved my issues. Thanks! masone Jens Kraemer wrote: > Hi! > > That's a nice bug you've found there - getting the real result count is > a bit tricky when the result set is limited by both ferret's :limit > option and active record conditions. It's one of those things I always > wanted to fix but finally forgot about ;-) > > I committed a possible fix right now that comes at the cost of an > additional ferret query and a "select count(*) where ...". Would be nice > if you could try out the current trunk of aaf to see if this fixes the > problem. > > If the additional queries and counting are too slow for you (but first, > give it a try ;-), you could eliminate the need for active record > conditions by indexing the forum_id and creationDate columns as > untokenized values and let ferret handle them. > > Jens > > > > On Wed, May 02, 2007 at 12:12:08PM +0200, Chengcai He wrote: >> options = default_options.merge options >> >> end >> http://www.ruby-forum.com/topic/93822 >> >> thanks! >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ferret-talk mailing list >> [email protected] >> 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 > [EMAIL PROTECTED] | www.webit.de > > Amtsgericht Dresden | HRB 15422 > GF Sven Haubold, Hagen Malessa -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

