Elastica
Elastica copied to clipboard
Empty post_filter results in json array in stead of object
If something empty is set to the post_filter (e.g. empty Bool Filter), the post_field is added to the request body as an empty array.
$query = new \Elastica\Query();
$query->setPostFilter(new \Elastica\Filter\BoolFilter());
Results in:
{
"post_filter": [],
"query": {
"match_all": {}
}
}
But has to be:
{
"post_filter": {},
"query": {
"match_all": {}
}
}
Seems like a array instead of stdin object issue. Could you open a PR to fix this?