private function expandQueryIndexes(SearchQuery $query)
    {
        $expandedIndexes = [];

        foreach ($query->getIndexes() as $index) {
            foreach ($this->getDecoratedIndexNames($index, $query->getLocale()) as $expandedIndex) {
                $expandedIndexes[$expandedIndex] = $expandedIndex;
            }
        }

        $query->setIndexes($expandedIndexes);
    }
private function expandQueryIndexes(SearchQuery $query)
    {
        $expandedIndexes = [];

        foreach ($query->getIndexes() as $index) {
            foreach ($this->getDecoratedIndexNames($index, $query->getLocale()) as $expandedIndex) {
                $expandedIndexes[$expandedIndex] = $expandedIndex;
            }
        }

        $query->setIndexes($expandedIndexes);
    }
private function expandQueryIndexes ( SearchQuery $ query ) { $ expandedIndexes = [ ] ; foreach ( $ query -> getIndexes ( ) as $ index ) { foreach ( $ this -> getDecoratedIndexNames ( $ index , $ query -> getLocale ( ) ) as $ expandedIndex ) { $ expandedIndexes [ $ expandedIndex ] = $ expandedIndex ; } } $ query -> setIndexes ( $ expandedIndexes ) ; }
Add additional indexes to the Query object.

If the query object has no indexes, then add all indexes (including
variants), otherwise expand the indexes the query does have to include
all of their variants.

@param SearchQuery $query
Add additional indexes to the Query object .