diff --git a/src/Elasticsearch/Client.php b/src/Elasticsearch/Client.php index 06efaee8b..f86bf45e3 100644 --- a/src/Elasticsearch/Client.php +++ b/src/Elasticsearch/Client.php @@ -395,12 +395,9 @@ public function countPercolate($params = array()) public function percolate($params) { $index = $this->extractArgument($params, 'index'); - - - $type = $this->extractArgument($params, 'type'); - - - $body = $this->extractArgument($params, 'body'); + $type = $this->extractArgument($params, 'type'); + $id = $this->extractArgument($params, 'id'); + $body = $this->extractArgument($params, 'body'); @@ -411,6 +408,7 @@ public function percolate($params) $endpoint = $endpointBuilder('Percolate'); $endpoint->setIndex($index) ->setType($type) + ->setID($id) ->setBody($body); $endpoint->setParams($params); $response = $endpoint->performRequest();