Follow Up. I have 5 mongrels and a ferret drb server running on the
same machine. In environment.rb I disable ferret like so:
MyModel.disable_ferret
I have a script that runs every hour that does the following:
MyModel.enable_ferret
MyModel.bulk_index all_records_created_or_changed_in_the_last_hour
Now, ClassMethods defines bulk_index as:
def bulk_index(*ids)
ids = ids.first if ids.size == 1 && ids.first.is_a?(Enumerable)
aaf_index.bulk_index(ids)
end
aaf_index is an instance of RemoteIndex that dispatches bulk_index to
the drb server, correct? If that's the case, then the Server class
sends the method call to the aaf_index, which has bulk_index defined
in ferret_extensions.rb, correct? the bulk_index method uses the
BulkIndexer.index_records method, which checks to see if ferret is
enbled for each record: rec.ferret_enabled?(true). Now, if this all
happens in the Drb server, wouldn't ferret be disabled there as it is
obviously using the same environment.rb file that disables ferret for
MyModel?
Thanks in advance.
On Oct 4, 2007, at 11:15 AM, Erik Morton wrote:
> If I disable ferret in my environment file and then run a cron job
> every hour to index the records that have been added/changed, do I
> enable Ferret just in the script that does the hourly indexing? Or
> do I somehow need to tell the process that runs the Ferret DRB
> server that it should start writing to the index again? Thanks in
> advance.
>
> Erik
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk