I have Windows machine, ElasticSearch 5.0.0 and a standard PHP client for ElasticSearch, that I installed using composer. Everything works ok, except delete operation. I can not delete by query and as a result get this error message:
Uncaught exception 'Elasticsearch\Common\Exceptions\InvalidArgumentException' with message 'id cannot be null.'
This is how I try to delete:
$client = ClientBuilder::create()->build();
$params = [
'index' => 'layers'
'type' => 'layers_type'
'body' => [
'bool' => [
'should' => [
[
'multi_match' => [
'query' => ["304"],
'fields' => ["id"] // not a surrogate _id, by my own id, that is a part of my index properties
]
]
]
]
]
];
$client->delete($params);
So, how can I fix it? Do I need to install any plugin and if yes, how can I do that on my Windows machine?