acts_as_ferret MultiIndex


I am working with Ferret and acts_as_ferret.

I have 9 different models that I am using for my search capability.
acts_as_ferret is working beautifully when I do searches on a specific

The problems come when I try to do a `search all` function.

Check these posts,

i think it would be easier to modify their versions to match yours. :slight_smile:

good luck

in one of my apps I did this:

  def search
    if params[:search_article] && params[:search_article][:q] != ""
      limit = 20
      order_by = "title ASC"
      @articles = Article.full_text_search(params[:search_article]
[:q], limit, order_by)
      order_by = "first_name ASC, last_name ASC"
      @users = User.full_text_search(params[:search_article][:q],
limit, order_by)
      order_by = "first_name ASC, last_name ASC"
      @birthdays = Birthday.full_text_search(params[:search_article]
[:q], limit, order_by)
      @birthdays = []
      @users = []
      @articles = []
      flash[:notice] = 'No fue encrontrado nada con esta criteria.'

model code:

  def self.full_text_search(q, limit, order_by)
     return nil if q.nil? or q==""
     results = self.find_by_contents(q,
      :order => order_by,
      :limit => limit
     return results