Ruby on rails 使用轮胎gem进行弹性搜索的镶嵌面尺寸
我是elasticsearch的新手。我试图使用tire gem为我的web应用程序创建方面。但我只能为任何方面创建7个条目。有没有一种方法,我可以操纵的大小方面的轮胎宝石弹性搜索 查询:Ruby on rails 使用轮胎gem进行弹性搜索的镶嵌面尺寸,ruby-on-rails,
elasticsearch,tire,Ruby On Rails,
elasticsearch,Tire,我是elasticsearch的新手。我试图使用tire gem为我的web应用程序创建方面。但我只能为任何方面创建7个条目。有没有一种方法,我可以操纵的大小方面的轮胎宝石弹性搜索 查询: { "query": { "bool": { "should": [ { "range": { "rank": { "lte": 50 } }
{
"query": {
"bool": {
"should": [
{
"range": {
"rank": {
"lte": 50
}
}
}
]
}
},
"sort": [
{
"rank": "asc"
}
],
"facets": {
"univ": {
"terms": {
"field": "state_id",
"size": 50,
"all_terms": false
}
}
},
"size": 5
}
可以向镶嵌面添加尺寸:
facet 'countries' do
terms : countries, size: 15
facet_filter :and, search_filter unless search_filter.empty?
end
我试过上面的方法。但是,当我包含一个新的方面时,它不会显示在方面列表中。知道我哪里出错了吗?你有地图吗?应该为要作为方面的字段编制索引。