【发布时间】:2017-12-29 05:12:28
【问题描述】:
我想查找一个 name 包含“Bob”并且有一个位于“paducah”或“smyrna”的位置的文档。
这是我现在拥有的:
query: {
bool: {
must: [
{ match: { name: 'bob' } },
{ match: { location: ['paducah', 'smyrna'] } }
],
},
},
我知道问题出在 location 数组中,因为如果我将其更改为没有数组的单个元素,查询就可以正常工作。
This is the closest answer i could find.
它不起作用,我收到以下错误:
[term] 格式错误的查询,应为 [END_OBJECT],但找到了 [FIELD_NAME]
【问题讨论】:
标签: elasticsearch