Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents(“title:bob”) it does return a movie
and if I modify that movie title to Bill and do
Movie.find_by_contents(“title:bill”) it will return the movie also.
But if I create a new media xyz and try to search on it
Movie.find_by_contents(“medias_name:xyz”) it doesn’t find it, I need
to rm -rf index/ and restart the server to make it find it. Any idea
how I can update the index on special fields?
thanx in advance
Pat