lib/Elastica/Type.php
public function request($path, $method, $data = [], array $query = [])
    {
        $path = $this->getName().'/'.$path;

        return $this->getIndex()->request($path, $method, $data, $query);
    }
public function request($path, $method, $data = [], array $query = [])
    {
        $path = $this->getName().'/'.$path;

        return $this->getIndex()->request($path, $method, $data, $query);
    }
public function request ( $ path , $ method , $ data = [ ] , array $ query = [ ] ) { $ path = $ this -> getName ( ) . '/' . $ path ; return $ this -> getIndex ( ) -> request ( $ path , $ method , $ data , $ query ) ; }
Makes calls to the elasticsearch server based on this type.

@param string $path   Path to call
@param string $method Rest method to use (GET, POST, DELETE, PUT)
@param array  $data   OPTIONAL Arguments as array
@param array  $query  OPTIONAL Query params

@return \Elastica\Response Response object
Makes calls to the elasticsearch server based on this type .