Hi!
On Mon, Aug 28, 2006 at 11:05:08AM +0200, Jean-Christophe Michel
wrote:> Hi,
>
> I have a max_results limit of 10, whatever value I pass to max_results,
> even if I drop this option in my class.
> Same limit using script/console
> Myclass.find_by_contents(query)
>
> Ideas ?
Use the :num_docs parameter to specify the number of results you want.
MyClass.find_by_contents(query, :num_docs => 100) will give you the
first 100 hits. The default for this option is 10.
The :max_results configuration value is only used if you specify
:num_docs => :all in your find_by_contents call:
MyClass.find_by_contents(query, :num_docs => :all)
With Ferret 0.10 / current acts_as_ferret trunk the :num_docs parameter
has been renamed to :limit .
Jens
--
webit! Gesellschaft f?r neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de
Schnorrstra?e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66