original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Add additional indexes to the Query object .