PHP Class Elastica\Bulk

Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_actions Elastica\Bulk\Action[]
$_client Client
$_index string | null
$_requestParams request parameters to the bulk api
$_type string | null

Public Methods

Method Description
__construct ( Client $client )
__toString ( ) : string
addAction ( Action $action )
addActions ( array $actions )
addData ( Elastica\Script\AbstractScript | Document | array $data, string $opType = null )
addDocument ( Document $document, string $opType = null )
addDocuments ( array $documents, string $opType = null )
addRawData ( array $data )
addScript ( Elastica\Script\AbstractScript $script, string $opType = null )
addScripts ( array $scripts, string $opType = null )
getActions ( ) : Action[]
getIndex ( ) : string | null
getPath ( ) : string
getType ( ) : string | null
hasIndex ( ) : boolean
hasType ( ) : boolean
send ( ) : ResponseSet
setIndex ( string | Index $index )
setRequestParam ( string $name, string $value ) Set a url parameter on the request bulk request.
setShardTimeout ( string $time ) Set the amount of time that the request will wait the shards to come on line.
setType ( string | Type $type )
toArray ( ) : array
toString ( ) : string

Protected Methods

Method Description
_processResponse ( Response $response ) : ResponseSet

Method Details

__construct() public method

public __construct ( Client $client )
$client Client

__toString() public method

public __toString ( ) : string
return string

_processResponse() protected method

protected _processResponse ( Response $response ) : ResponseSet
$response Response
return Elastica\Bulk\ResponseSet

addAction() public method

public addAction ( Action $action )
$action Elastica\Bulk\Action

addActions() public method

public addActions ( array $actions )
$actions array

addData() public method

public addData ( Elastica\Script\AbstractScript | Document | array $data, string $opType = null )
$data Elastica\Script\AbstractScript | Document | array
$opType string

addDocument() public method

public addDocument ( Document $document, string $opType = null )
$document Document
$opType string

addDocuments() public method

public addDocuments ( array $documents, string $opType = null )
$documents array
$opType string

addRawData() public method

public addRawData ( array $data )
$data array

addScript() public method

public addScript ( Elastica\Script\AbstractScript $script, string $opType = null )
$script Elastica\Script\AbstractScript
$opType string

addScripts() public method

public addScripts ( array $scripts, string $opType = null )
$scripts array
$opType string

getActions() public method

public getActions ( ) : Action[]
return Elastica\Bulk\Action[]

getIndex() public method

public getIndex ( ) : string | null
return string | null

getPath() public method

public getPath ( ) : string
return string

getType() public method

public getType ( ) : string | null
return string | null

hasIndex() public method

public hasIndex ( ) : boolean
return boolean

hasType() public method

public hasType ( ) : boolean
return boolean

send() public method

public send ( ) : ResponseSet
return Elastica\Bulk\ResponseSet

setIndex() public method

public setIndex ( string | Index $index )
$index string | Index

setRequestParam() public method

Set a url parameter on the request bulk request.
public setRequestParam ( string $name, string $value )
$name string name of the parameter
$value string value of the parameter

setShardTimeout() public method

Requires Elasticsearch version >= 0.90.8.
public setShardTimeout ( string $time )
$time string timeout in Elasticsearch time format

setType() public method

public setType ( string | Type $type )
$type string | Type

toArray() public method

public toArray ( ) : array
return array

toString() public method

public toString ( ) : string
return string

Property Details

$_actions protected_oe property

protected Action[],Elastica\Bulk $_actions
return Elastica\Bulk\Action[]

$_client protected_oe property

protected Client,Elastica $_client
return Client

$_index protected_oe property

protected string|null $_index
return string | null

$_requestParams protected_oe property

request parameters to the bulk api
protected $_requestParams

$_type protected_oe property

protected string|null $_type
return string | null