lib/Elastica/Client.php
public function bulk(array $params)
    {
        if (empty($params)) {
            throw new InvalidException('Array has to consist of at least one param');
        }

        $bulk = new Bulk($this);

        $bulk->addRawData($params);

        return $bulk->send();
    }
public function bulk(array $params)
    {
        if (empty($params)) {
            throw new InvalidException('Array has to consist of at least one param');
        }

        $bulk = new Bulk($this);

        $bulk->addRawData($params);

        return $bulk->send();
    }
public function bulk ( array $ params ) { if ( empty ( $ params ) ) { throw new InvalidException ( 'Array has to consist of at least one param' ) ; } $ bulk = new Bulk ( $ this ) ; $ bulk -> addRawData ( $ params ) ; return $ bulk -> send ( ) ; }
Bulk operation.

Every entry in the params array has to exactly on array
of the bulk operation. An example param array would be:

array(
array('index' => array('_index' => 'test', '_type' => 'user', '_id' => '1')),
array('user' => array('name' => 'hans')),
array('delete' => array('_index' => 'test', '_type' => 'user', '_id' => '2'))
);

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html

@param array $params Parameter array

@throws \Elastica\Exception\ResponseException
@throws \Elastica\Exception\InvalidException

@return \Elastica\Bulk\ResponseSet Response object
Bulk operation .