| Class | ActsAsFerret::RemoteIndex |
| In: |
lib/remote_index.rb
|
| Parent: | AbstractIndex |
This index implementation connects to a remote ferret server instance. It basically forwards all calls to the remote server.
# File lib/remote_index.rb, line 9
9: def initialize(config)
10: super
11: @server = DRbObject.new(nil, ActsAsFerret::remote)
12: end
# File lib/remote_index.rb, line 35
35: def find_ids(q, options = {}, &proc)
36: total_hits, results = handle_drb_error([0, []]) { @server.find_ids(index_name, q, options) }
37: block_given? ? yield_results(total_hits, results, &proc) : [ total_hits, results ]
38: end
# File lib/remote_index.rb, line 20
20: def method_missing(method_name, *args)
21: args.unshift index_name
22: handle_drb_error { @server.send(method_name, *args) }
23: end