Forum: Ferret Problem with Adge ActsAsFerret

Posted by Antonio Faust45 (faust45)
on 2008-11-25 10:29
Hi guys!

We try use ActsAsFerret from trunk
But shit happen!

We create singel index for multi models like in
http://www.ruby-forum.com/topic/167953#new
When we use Local index all work good.
But when work with Drb Server with singel index it`s work very strange
Whot he do: when we set params page & per_page in ferret_options not in
ar_options
he fetch all records that hi found!
but with Local Index All right.

I go to source ActsAsFerret and see that for multi model search use
late_pagination(after fetching all records for all models)
hi send message for index  index.shared?
With local Index index.shared? return true
But with Drb Server index.shared? return false
What is Shet?

I deep in source and so
method shared? of Class Index check
index_definition[:registered_models].size > 1

when i define index all models put in
index_definition[:registered_models] << clazz  Thats true for
LOCAL_INDEX only
When i use Drb serv i dont anderstand how models registerd
thats  sorce code from ferret_server
 def register_class(class_name)
        @logger.debug "############ registerclass #{class_name}"
        class_name.constantize
        @logger.debug "index for class #{class_name}:
#{ActsAsFerret::ferret_indexes[class_name.underscore.to_sym]}"

      end
I dont anderstand why registerd  process send rend request to Drb server
but asking index.shared?  don send to Drb and looking to
index_definition[:registered_models].size > 1
as for LOCAL_INDEX

Now i try install ferret from trun!
May be some one cat comment this please help!
Thanks!
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.