@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_hspAs_hsp のブックマーク 2014/01/07 18:59

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

solr sunspot - searching belongs_to association

    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...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう