I am trying to find all the results which is not contain a field 'open_location'. I am using the below code. But it gives me the error for print result. The error is, parsing_exception: no [query] registered for [filtered]
I have seen this question for my solution, Best way to check if a field exist in an Elasticsearch document But
Please help me...
$index_name=$db_name.'_temp_traking';
$para= [
'index' => $index_name,
'type' => $index_name,
'body' => [
'query' => [
'filtered' => [
'filter' => [
'bool' => [
'must_not' => [
'missing' => [
'field' => 'open_location'
]
]
]
]
]
]
]
];
$response = $client->search($para);