code: public function setIndex($index) {
          if (is_array($index))
              $index = implode(",", array_filter($index));
          $this->index = $index;
          $this->transport->setIndex($index);
          return $this;
      }
docs: Change what index to go against
  @return \ElasticSearch\Client
  @param mixed $index