# Ferret DRB, can add/modify index, but not search

**URL:** <https://www.ruby-forum.com/t/ferret-drb-can-add-modify-index-but-not-search/114092>\
**Category:** Rails\
**Created:** [September 7, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/ferret-drb-can-add-modify-index-but-not-search/114092 "2007-09-07T20:07:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonpt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6f9a4e/32.png) [@brandonpt](https://www.ruby-forum.com/u/brandonpt)\
**Post date:** [September 7, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/ferret-drb-can-add-modify-index-but-not-search/114092/1 "2007-09-07T20:07:35Z")

</div>

I’m trying to use the Ferret DRB server to avoid concurrency issues when  
using multiple mongrels. I can successfully add and edit data on my  
index via the DRB server, however, when I search the index, I get the  
following error:

DRb::DRbConnError (DRb::DRbServerNotFound):  
/usr/lib/ruby/1.8/drb/drb.rb:1647:in `current_server' /usr/lib/ruby/1.8/drb/drb.rb:1709:in`to\_id’  
/usr/lib/ruby/1.8/drb/drb.rb:1045:in `initialize' /usr/lib/ruby/1.8/drb/drb.rb:639:in`make\_proxy’  
/usr/lib/ruby/1.8/drb/drb.rb:556:in `dump' /usr/lib/ruby/1.8/drb/drb.rb:600:in`send\_request’  
/usr/lib/ruby/1.8/drb/drb.rb:599:in `send_request' /usr/lib/ruby/1.8/drb/drb.rb:903:in`send\_request’  
/usr/lib/ruby/1.8/drb/drb.rb:1191:in `send_message' /usr/lib/ruby/1.8/drb/drb.rb:1083:in`method\_missing’  
/usr/lib/ruby/1.8/drb/drb.rb:1167:in `open' /usr/lib/ruby/1.8/drb/drb.rb:1082:in`method\_missing’  
/usr/lib/ruby/1.8/drb/drb.rb:1100:in `with_friend' /usr/lib/ruby/1.8/drb/drb.rb:1081:in`method\_missing’  
/vendor/plugins/acts\_as\_ferret/lib/remote\_index.rb:20:in  
`find_id_by_contents' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:120:in`find\_id\_by\_contents’  
/vendor/plugins/acts\_as\_ferret/lib/class\_methods.rb:176:in  
`ar_find_by_contents' /vendor/plugins/acts_as_ferret/lib/class_methods.rb:170:in`find\_records\_lazy\_or\_not’  
/vendor/plugins/acts\_as\_ferret/lib/class\_methods.rb:86:in  
`find_by_contents' /app/models/article.rb:104:in`full\_text\_search’  
/app/controllers/search\_controller.rb:93:in `index' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in`perform\_action\_without\_filters’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:632:in  
`call_filter' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in`perform\_action\_without\_benchmark’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in`measure’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in  
`perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in`perform\_action’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:430:in  
`process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in`process\_without\_session\_management\_support’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/session\_management.rb:114:in  
`process' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in`process’  
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in  
`dispatch' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in`process’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in  
`process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in`process\_client’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in  
`process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in`run’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
`run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in`run’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in  
`run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in`run’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:127:in  
`run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in`run’  
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:243  
/usr/bin/mongrel\_rails:16

* * *

When I’m adding/editing data in the index, my ferret\_server.log file  
shows the following:

#method\_missing(:add, [“Article”, {:synopsis=\>“Analysis and  
Projections”, :status=\>1, :player\_names=\>"", :team\_names=\>"",  
:publisher=\>"", :title=\>“Article Title”, :db\_state=\>0, :id=\>1,  
:article\_published\_date=\>1189115220}])  
#method\_missing(:add, [“Article”, {:synopsis=\>“Analysis and  
Projections”, :status=\>1, :player\_names=\>"", :team\_names=\>"",  
:publisher=\>"", :title=\>“Article Title 1”, :db\_state=\>0, :id=\>1,  
:article\_published\_date=\>1189115220}])  
#method\_missing(:add, [“Player”, {:last\_name=\>“Smith”,  
:first\_name=\>“Walter”, :db\_state=\>0, :id=\>1}])  
#method\_missing(:add, [“Team”, {:name=\>“Kalispell HS”, :db\_state=\>0,  
:id=\>13}])

* * *

I’m running the following environment:

Linux version 2.6.16.29-xen\_3.0.3.0  
mongrel (1.0.1)  
mongrel\_cluster (1.0.2, 0.2.1)  
ferret (0.11.4)  
acts\_as\_ferret stable plugin (as of 9/7/2007)

I have no problem running this application on my local development  
environment… and I had no problems running in this hosting environment  
before I started using Ferret DRB.

Here are some example sorts and/or filters I’m using in my searches (not  
sure if this matters to Ferret DRB or not):

Ferret::Search::SortField.new(:article\_published\_date, :reverse =\> true)

Ferret::Search::Sort.new([Ferret::Search::SortField::SCORE, date\_sort])

Ferret::Search::RangeQuery.new(:article\_published\_date, :\>= =\>  
UserSystem::APP\_DEFAULTS[:days\_for\_new].days.ago.utc.to\_i.to\_s, :\<= =\>  
Time.now.utc.to\_i.to\_s)

Ferret::Search::Sort.new([Ferret::Search::SortField.new(:article\_published\_date,  
:reverse =\> true)])

Any ideas why my searches wouldn’t be working?
