Skip to content

Commit 76dd8ed

Browse files
Merge pull request #40 from Flowpack/remove-duplicate-es-check
TASK: Remove duplicate Elasticsearch check
2 parents 57e128d + 0b2d939 commit 76dd8ed

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Classes/Controller/SuggestController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ protected function extractCompletions($response)
178178
*/
179179
protected function extractSuggestions($response)
180180
{
181-
if ($this->elasticSearchClient === null) {
182-
throw new \RuntimeException('The SuggestController needs an ElasticSearchClient, it seems you run without the flowpack/elasticsearch-contentrepositoryadaptor package, though.', 1487189823);
183-
}
184181
$suggestionOptions = isset($response['suggest']) ? $response['suggest'] : [];
182+
185183
if (count($suggestionOptions['suggestions'][0]['options']) > 0) {
186184
return $suggestionOptions['suggestions'][0]['options'];
187185
}

0 commit comments

Comments
 (0)