I am using the following query :
$params = ['index' => '201706', 'type' => 'youtube','body' => ['query' => [ 'bool' => [ 'filter' => ['range' => ['created_at' => [ 'gte'=> '2017-06-25 00:00:00','lte' => '2017-09-30 00:00:00']]], 'query' => [ 'match' => ['description' => 'kashmir']],],] ] ];
And I am getting this error:
PHP Fatal error: Uncaught exception 'Elasticsearch\Common\Exceptions\BadRequest400Exception' with message '{"error":{"root_cause":[{"type":"parsing_exception","reason":"[bool] query does not support [query]","line":1,"col":119}],"type":"parsing_exception","reason":"[bool] query does not support [query]","line":1,"col":119},"status":400}' in /home/akhil/Documents/june/elastic/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:610
Kindly help me rectify this issue
Thanks,
Akhil