“@search = Fabric.search do fulltext params[:search] do fields(:collection, :style, :origin) end ..... end Here is how you index in your searchable block. Solr thinks in terms of document. It doesn't care it's an association or not. searchable do text :collection do collection.text end end”
I have a fabrics model that belongs to multiple other tables. class Fabric < ActiveRecord::Base validates :name, presence: true belongs_to :design belongs_to :composition belongs_to :collection bel...
“@search = Fabric.search do fulltext params[:search] do fields(:collection, :style, :origin) end ..... end Here is how you index in your searchable block. Solr thinks in terms of document. It doesn't care it's an association or not. searchable do text :collection do collection.text end end”
As_hsp のブックマーク 2014/01/07 18:59
このブックマークにはスターがありません。
最初のスターをつけてみよう!
solr sunspot - searching belongs_to association
stackoverflow.com2014/01/07
I have a fabrics model that belongs to multiple other tables. class Fabric < ActiveRecord::Base validates :name, presence: true belongs_to :design belongs_to :composition belongs_to :collection bel...
2 人がブックマーク・2 件のコメント
\ コメントが サクサク読める アプリです /