【发布时间】:2017-09-02 20:40:20
【问题描述】:
ES 数据的索引如下:
{
"addresses" : [
{
"id" : 69,
"location": "New Delhi"
},
{
"id" : 69,
"location": "Mumbai"
}
],
"goods" : [
{
"id" : 396,
"name" : "abc",
"price" : 12500
},
{
"id" : 167,
"name" : "XYz",
"price" : 12000
},
{
"id" : 168,
"name" : "XYz1",
"price" : 11000
},
{
"id" : 169,
"name" : "XYz2",
"price" : 13000
}
]
}
在我的查询中,我想获取至少一个地址匹配且商品价格范围在 11000 到 13000 之间且名称为 xyz 的记录。
【问题讨论】:
-
我建议您查看bool query、range query 和match 或term query
-
到目前为止你尝试了什么?
标签: elasticsearch elasticsearch-dsl