Solr Sunspot - поиск принадлежит_ к ассоциации

У меня есть модель тканей, которая принадлежит нескольким другим столам.

class Fabric < ActiveRecord::Base
  validates :name, presence: true
  belongs_to :design
  belongs_to :composition
  belongs_to :collection
  belongs_to :style
  belongs_to :origin
  belongs_to :texture
  belongs_to :supplier
  has_and_belongs_to_many :colours

  searchable do
    text :name, :boost => 5 
    text :description
    text :composition do
      composition.name
   end
    text :collection do
      collection.name
    end
   text :style do
     style.name
   end
   text :origin do
     origin.name
   end
   text :texture do
     texture.name
  end
   text :supplier do
      supplier.name
  end
  end
  end

Я настроил все обратные ассоциации (Has_many) и т. Д. Однако я не могу получить полнотекстовый поиск для запроса полей имени всех этих связанных таблиц.

Любая помощь будет принята с благодарностью.

 @search = Fabric.search do
    fulltext params[:search]
  end
  @fabrics = @search.results

Росс

Ответы на вопрос(3)

Ваш ответ на вопрос