Acts_as_ferret limit on multi_search not working?

I’m using acts_as_ferret to do a query like this:

Model1.multi_search(“my query”,[Model2,Model3], :limit => 2)

No matter what number i set limit to I get 10 items in the resultset. Am
I doing something wrong?

Thanks/David

On Wed, Sep 20, 2006 at 04:22:18PM +0200, David W. wrote:

I’m using acts_as_ferret to do a query like this:

Model1.multi_search(“my query”,[Model2,Model3], :limit => 2)

No matter what number i set limit to I get 10 items in the resultset. Am
I doing something wrong?

nothing, this is supposed to work. what version of Ferret/aaf do you
use ?

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Jens K. wrote:

On Wed, Sep 20, 2006 at 04:22:18PM +0200, David W. wrote:

I’m using acts_as_ferret to do a query like this:

Model1.multi_search(“my query”,[Model2,Model3], :limit => 2)

No matter what number i set limit to I get 10 items in the resultset. Am
I doing something wrong?

nothing, this is supposed to work. what version of Ferret/aaf do you
use ?

Jens


webit! Gesellschaft f�r neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Kr�mer [email protected]
Schnorrstra�e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

I’m using ferret 0.10.4 and aaf 0.3.0. I’ll try to make it into a
testcase so it easier to reproduce.

This is my actual query:

Pressrelease.multi_search(“con*”,[Event,Image],:limit => 2).size
=> 10

/david

I’m getting the exact same behavior
ferret 0.10.9
aaf 0.3.0

joshua

On Wed, Oct 04, 2006 at 06:16:36PM -0600, Joshua B. wrote:

and I just found the culprit…
Line 27 of multi_index.rb

searcher.search_each(query, options={}, &block)

should be

searcher.search_each(query, options, &block)

yeah, this has been fixed in trunk a while ago, I’ll try to push
out a new release soon.

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

and I just found the culprit…
Line 27 of multi_index.rb

searcher.search_each(query, options={}, &block)

should be

searcher.search_each(query, options, &block)

joshua