太阳黑子::你如何返回加入的结果?

时间:2011-10-06 21:11:56

标签: ruby-on-rails ruby solr sunspot

我有很多表,我想在搜索返回中返回结果。我该怎么做?

model User
  has_many :jobs, :through => user_jobs

  searchable do 
   text :name, :sort_name
   integer :id
   integer :, :multiple => true, :references => Job
  end
end

model UserJob
  belongs_to :users
  belongs_to :jobs
end

model Job
  has_many :users, :through => user_jobs
end

0 个答案:

没有答案