我正在使用elasticsearch 5.2.2。elasticsearch中的数组中没有匹配
在我的索引我一直在寻找这样的数据:
{
"_index": "index",
"_type": "273caf76-ec03-478c-b980-9743180bc863",
"_id": "eee46e24-f383-4ae7-8930-dc3836e030a5",
"_score": 3.41408,
"_source": {
"Father Name": [
{
"id": "some id",
"value": "Some value test test"
}
],
"Mother Name": [
{
"id": "some id",
"value": "Another value haha"
}
],
"Other values": [{ id: "", value: ""}]
}
}
当我与_all搜索,一切工作正常,我可以用合理的分数
{"query":{"match":{"_all":"value"}},"from":0,"size":20}
但是,发现所有的结果查询正在所有字段中搜索。如果我想要例如在Father Name
或Father Name
和Mother Name
中查找结果,那么我什么也找不到。
{"query":{"match":{"Father Name":"value"}},"from":0,"size":20}
我的目标是找到像_all一样的搜索,但仅限于几个字段。