original_string: protected function __query($index, $type = null, array $query = []) {
          $result = $this->client->search([
              'index' => $index,
              'body' => array_merge_recursive($query, $this->additionalQuery())
                  ] + ($type ? ['type' => $type] : []));
          return $this->_makeResult($result);
      }
code: protected function __query($index, $type = null, array $query = []) {
          $result = $this->client->search([
              'index' => $index,
              'body' => array_merge_recursive($query, $this->additionalQuery())
                  ] + ($type ? ['type' => $type] : []));
          return $this->_makeResult($result);
      }
code_tokens: protected function __query ( $ index , $ type = null , array $ query = [ ] ) { $ result = $ this -> client -> search ( [ 'index' => $ index , 'body' => array_merge_recursive ( $ query , $ this -> additionalQuery ( ) ) ] + ( $ type ? [ 'type' => $ type ] : [ ] ) ) ; return $ this -> _makeResult ( $ result ) ; }
docstring: The actual method to call client's search method.
  Returns Result object
  
  @param string $index
  @param string $type if null, then all types will be searched
  @param array $query
  @return Result|Model[]
docstring_tokens: The actual method to call client s search method . Returns Result object