lib/Elastica/Pipeline.php
public function create()
    {
        if (empty($this->id)) {
            throw new InvalidException('You should set a valid pipeline id');
        }

        if (empty($this->_params['description'])) {
            throw new InvalidException('You should set a valid processor description.');
        }

        if (empty($this->_processors['processors'])) {
            throw new InvalidException('You should set a valid processor of type Elastica\Processor\AbstractProcessor.');
        }

        $endpoint = new Put();
        $endpoint->setID($this->id);
        $endpoint->setBody($this->toArray());

        return $this->requestEndpoint($endpoint);
    }
public function create()
    {
        if (empty($this->id)) {
            throw new InvalidException('You should set a valid pipeline id');
        }

        if (empty($this->_params['description'])) {
            throw new InvalidException('You should set a valid processor description.');
        }

        if (empty($this->_processors['processors'])) {
            throw new InvalidException('You should set a valid processor of type Elastica\Processor\AbstractProcessor.');
        }

        $endpoint = new Put();
        $endpoint->setID($this->id);
        $endpoint->setBody($this->toArray());

        return $this->requestEndpoint($endpoint);
    }
public function create ( ) { if ( empty ( $ this -> id ) ) { throw new InvalidException ( 'You should set a valid pipeline id' ) ; } if ( empty ( $ this -> _params [ 'description' ] ) ) { throw new InvalidException ( 'You should set a valid processor description.' ) ; } if ( empty ( $ this -> _processors [ 'processors' ] ) ) { throw new InvalidException ( 'You should set a valid processor of type Elastica\Processor\AbstractProcessor.' ) ; } $ endpoint = new Put ( ) ; $ endpoint -> setID ( $ this -> id ) ; $ endpoint -> setBody ( $ this -> toArray ( ) ) ; return $ this -> requestEndpoint ( $ endpoint ) ; }
Create a Pipeline.

@return Response

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html
Create a Pipeline .