我有一个型号产品
class Product < ActiveRecord::Base
belongs_to :user
has_many :category_products
has_many :categories , through: :category_products
我想在类别和用户中进行全文搜索,但它无法正常工作
searchable do
text :title, :boost => 5
text :description
text :categories do
categories.map(&:name)
end
text :user do
user.first_name
end
端