Forum: Ferret multi_search problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Geoffrey D. (Guest)
on 2006-05-18 09:25
I am running into the following error when I try to search across
multiple models with multi_search()  I have rebuilt the indices and can
search on each model individually using the Rails console.

Here is the output from the console.
>> Post.multi_search('new', [Message, WikiPage])
ArgumentError: wrong number of arguments (1 for 0)
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:441:in
`initialize'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:441:in
`create_new_multi_reader'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:406:in
`ensure_reader'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:397:in
`initialize'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:378:in
`multi_index'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:364:in
`id_multi_search'
        from
./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:353:in
`multi_search'
        from (irb):1
>> Post.find_by_contents('new')
=> [#<Post:0xb7349984 @attributes=...
>> Message.find_by_contents('new')
=> [#<Message:0xb7302dcc @attributes=...
>>

I am using the latest aaf from subversion and ferret 0.9.3

All models declare acts_as_ferret :store_class_name => true
Jens K. (Guest)
on 2006-05-18 12:11
(Received via mailing list)
Hi Geoffrey,

On Thu, May 18, 2006 at 07:25:59AM +0200, Geoffrey Dagley wrote:
> I am running into the following error when I try to search across
> multiple models with multi_search()  I have rebuilt the indices and can
> search on each model individually using the Rails console.
>
> Here is the output from the console.
> >> Post.multi_search('new', [Message, WikiPage])
> ArgumentError: wrong number of arguments (1 for 0)
[..]
this is a known problem with Ferret's 0.9.x C-Version. using either the
Ruby-only version (require 'rferret') or version 0.3.2 (which with it's
C-extension is way faster than Ruby-only 0.9) should fix this.

I'm working on an aaf version fully compatible with Ferret 0.9.3
(C-Version), hope to get this done soon.


Jens

--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer 
removed_email_address@domain.invalid
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.