\ElasticaIndexTemplate

Elastica index template object.

Summary

Methods
Properties
Constants
__construct()
delete()
create()
exists()
getName()
getClient()
request()
No public properties found
No constants found
No protected methods found
$_name
$_client
N/A
No private methods found
No private properties found
N/A

Properties

$_name

$_name : string

Index template name.

Type

string — Index pattern

$_client

$_client : \Elastica\Client

Client object.

Type

\Elastica\Client — Client object

Methods

__construct()

__construct(\Elastica\Client  $client, string  $name) 

Creates a new index template object.

Parameters

\Elastica\Client $client

Client object

string $name

Index template name

Throws

\Elastica\Exception\InvalidException

delete()

delete() : \Elastica\Response

Deletes the index template.

Returns

\Elastica\Response

Response object

create()

create(array  $args = array()) : \Elastica\Response

Creates a new index template with the given arguments.

Parameters

array $args

OPTIONAL Arguments to use

Returns

\Elastica\Response

exists()

exists() : boolean

Checks if the given index template is already created.

Returns

boolean —

True if index exists

getName()

getName() : string

Returns the index template name.

Returns

string —

Index name

getClient()

getClient() : \Elastica\Client

Returns index template client.

Returns

\Elastica\Client

Index client object

request()

request(string  $method, array  $data = array()) : \Elastica\Response

Makes calls to the elasticsearch server based on this index template name.

Parameters

string $method

Rest method to use (GET, POST, DELETE, PUT)

array $data

OPTIONAL Arguments as array

Returns

\Elastica\Response

Response object