資産モデル:
searchable do
text :title
text :description
time :created_at
integer :category_ids, :multiple => true, :references => Category
end
コントローラ:
search = Asset.search() do
keywords(h(params[:query]), :fields => [:title, :description])
facet(:category_ids)
order_by :created_at
end
(ヒット数)でファセット:Category_ides
をソートしたくありません。:count
カテゴリは で並べる必要がありますcreated_at
。ドキュメントを見るfacet(:category_ids, :sort
=> :count || :index
)、両方のオプションが機能しません。
このファセットの順序の問題を解決するにはどうすればよいですか?