diff --git a/lib/Elastica/Type.php b/lib/Elastica/Type.php index 2f7d1a8b50..c10cc74f8c 100644 --- a/lib/Elastica/Type.php +++ b/lib/Elastica/Type.php @@ -258,11 +258,7 @@ public function moreLikeThis(Elastica_Document $doc, $args = array()) { // mlt API needs args as http get params if (!empty($args)) { - $argsStrings = array(); - foreach ($args as $key => $value) { - $argsStrings[] = $key . '=' . $value; - } - $path .= '?' . implode('&', $argsStrings); + $path .= '?' . http_build_query($args); } $response = $this->request($path, Elastica_Request::GET);