如何在Tire中指定面的顺序?
这在Elasticsearch中是可能的,如下所示:http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet.html
在轮胎中,它的默认值是'count‘,但是我想不出如何将它改为'term’的顺序。
下面是我的搜索方法:
def self.search(params)
tire.search do
query do
boolean do
must { string params[:query], default_operator: "AND" } if params[:query].present?
end
end
facet "article_ratings" do
terms :article_rating
end
# raise to_curl
end结束
发布于 2012-09-15 16:31:00
弄清楚了..。
facet "article_ratings" do
terms :article_rating, :order => 'term'
endhttps://stackoverflow.com/questions/12430937
复制相似问题