From 5f83b52d34885bddba0b34351fafc1ce970468c0 Mon Sep 17 00:00:00 2001 From: arconen Date: Thu, 10 Aug 2017 22:38:39 +0300 Subject: [PATCH] Fix ClientBuilder - pass correct argument for Elasticsearch\Endpoints\MsearchTemplate::__construct. (#605) --- src/Elasticsearch/ClientBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elasticsearch/ClientBuilder.php b/src/Elasticsearch/ClientBuilder.php index a5cfe4e7e..78ced3211 100644 --- a/src/Elasticsearch/ClientBuilder.php +++ b/src/Elasticsearch/ClientBuilder.php @@ -509,7 +509,7 @@ public function build() $this->endpoint = function ($class) use ($serializer) { $fullPath = '\\Elasticsearch\\Endpoints\\' . $class; - if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MPercolate') { + if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MsearchTemplate' || $class === 'MPercolate') { return new $fullPath($serializer); } else { return new $fullPath();