我正在尝试运行一个查询,该查询将基于布尔型必须匹配查询和has_parent查询提取结果。但是,我不知道如何将这两个参数组合在一起。我要合并在一起的两个查询如下:
$params = [
'body' => [
'query' => [
'match' => [
'city' => 'UK'
]
]
]
];
$paramsTwo = [
'body' => [
'query' => [
'has_child' => [
'type' => 'asset',
'query' => [
'bool' => [
'must' => [
'match' => ['asset_type' => 'Hot Desk']
],
'should' => [
'match' => ['description' => 'coffee']
]
]
]
]
]
]
];
我想在venues
中找到'UK'
(孩子)也assets
(应该是'hot desks'
的{{1}}(父母)-相关。
有帮助吗?
coffee