Hey.. > Question 1: > If I add acts_as_ferret :fields => [:group_id, :document_text] can I > do an activerecord search like... > Document.find(:all, :conditions => ['group_id in (?)', session > [:group_ids]) ?
yes, you can. Check the FQL. But i wouldn't trust the ferret index, if you plan to use this to fetch security-related objects. > Question 2: > These documents are dynamic, so they are deleted, updated, edited etc. > How do I handle indexing in these circumstances? Delete all and > recreate -or- is there a way to just delete an index by document_id > and recreate it just for that document. use acts_as_ferret or check the way acts_as_ferret implements after_save/after_destroy hooks[1]. But basically, if you use AAF, you don't need to think about that :) If you don't use AAF, you need to implement hooks (like an observer) on save/destroy, check [2] for an example (including cache sweepers). > I am going to try this in the app but before I took the plunge I > thought I'd ask first. good idea :) Hope that helps .. Ben [1] - http://projects.jkraemer.net/acts_as_ferret/browser/trunk/ plugin/acts_as_ferret/lib/act_methods.rb [2] - http://bugs.omdb.org/browser/trunk/app/models/observers/ search_observer.rb _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

