From e0f0985a6f6e970bac7d7e574f32b2525b16c755 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Mon, 21 Aug 2017 17:40:36 -0400 Subject: [PATCH] Shrink API was not setting body correctly --- src/Elasticsearch/Namespaces/IndicesNamespace.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Elasticsearch/Namespaces/IndicesNamespace.php b/src/Elasticsearch/Namespaces/IndicesNamespace.php index 2ad6b1585..ea20f2c2d 100644 --- a/src/Elasticsearch/Namespaces/IndicesNamespace.php +++ b/src/Elasticsearch/Namespaces/IndicesNamespace.php @@ -248,6 +248,7 @@ 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; @@ -255,7 +256,8 @@ public function shrink($params = array()) /** @var \Elasticsearch\Endpoints\Indices\Shrink $endpoint */ $endpoint = $endpointBuilder('Indices\Shrink'); $endpoint->setIndex($index) - ->setTarget($target); + ->setTarget($target) + ->setBody($body); return $this->performRequest($endpoint); }