Remove useless dynamic search dispatch

This commit is contained in:
Mathieu Darse
2015-03-17 18:25:32 +01:00
parent 4419b1b3a7
commit d766dccfff

View File

@@ -282,7 +282,7 @@ class ElasticSearchEngine implements SearchEngineInterface
$params['body']['aggs'] = $aggs;
}
$res = $this->doExecute('search', $params);
$res = $this->client->search($params);
$results = new ArrayCollection();
$suggestions = new ArrayCollection();
@@ -533,17 +533,6 @@ class ElasticSearchEngine implements SearchEngineInterface
return $sort;
}
private function doExecute($method, array $params)
{
$res = call_user_func([$this->client, $method], $params);
if (isset($res['error'])) {
throw new RuntimeException('Unable to execute method '.$method);
}
return $res;
}
private function getFlagsKey(\appbox $appbox)
{
$flags = [];