Skip to content

Commit

Permalink
Shrink API was not setting body correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfractal committed Aug 21, 2017
1 parent 38febbe commit e0f0985
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Elasticsearch/Namespaces/IndicesNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,16 @@ public function shrink($params = array())
{
$index = $this->extractArgument($params, 'index');
$target = $this->extractArgument($params, 'target');
$body = $this->extractArgument($params, 'body');

/** @var callback $endpointBuilder */
$endpointBuilder = $this->endpoints;

/** @var \Elasticsearch\Endpoints\Indices\Shrink $endpoint */
$endpoint = $endpointBuilder('Indices\Shrink');
$endpoint->setIndex($index)
->setTarget($target);
->setTarget($target)
->setBody($body);

return $this->performRequest($endpoint);
}
Expand Down

0 comments on commit e0f0985

Please sign in to comment.