private function validateQuery(SearchQuery $query)
    {
        $indexNames = $this->getIndexNames();
        $queryIndexNames = $query->getIndexes();

        foreach ($queryIndexNames as $queryIndexName) {
            if (!in_array($queryIndexName, $indexNames)) {
                $unknownIndexes[] = $queryIndexName;
            }
        }

        if (false === empty($unknownIndexes)) {
            throw new Exception\SearchException(
                sprintf(
                    'Search indexes "%s" not known. Known indexes: "%s"',
                    implode('", "', $queryIndexNames),
                    implode('", "', $indexNames)
                )
            );
        }
    }