On Wed, Mar 14, 2007 at 06:11:17PM +0100, neongrau __ wrote: > Jens Kraemer wrote: > > if used without a block, find_id_by_contents returns a 2-element-array > > where the first element is the number of total hits and the last element > > is the results array, so > > ok, found that while checking on the console. > > but whats the difference to just ask for .length on the resulting array > on the old behavior?
if you use :limit to only fetch 20 or so results, total_hits will still tell you the total number of results, while results.length will be 20. 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 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

