I’ve seen this question asked a few times but I haven’t seen an answer.
I’m using the AAF plugin in my rails app and I have a flag on my model
that indicates if an item is to be indexed. I then access this flag via
the acts_as_ferret call.
:if => Proc.new { |domain| domain.do_index?}
all do_index? does is look at a boolean at the moment
def do_index?
self.available
end
My AAF line is
acts_as_ferret(:if => Proc.new { |domain| domain.do_index?}, :remote =>
true, :fields =>{:name => {:store => :yes, :boost => 2}, :search_terms
=> {:store => :yes, :boost => 1.5}, :keywords => {:store => :yes }},
:ferret => {:analyzer => StemmedAnalyzer.new})
Everything in the model gets indexed, regardless of the flag setting.
I am using DRb. I haven’t restarted the server but I have called
rebuild_index on my model and watched items with available=false get
indexed.