/** * {@inheritDoc} */ public function search($keywords, $filters = []) { $results = []; foreach ($this->enabledSearchTypes as $searchType) { $results = array_merge($results, $this->filter($this->normalizeResultSet($this->repository->search($keywords, $searchType)), $filters)); if (count($results) >= $this->getSatisfactionThreshold()) { $results = array_slice($results, 0, $this->getSatisfactionThreshold()); break; } } return array_values($results); }