DEFAULT_REFRESH_INTERVAL
DEFAULT_REFRESH_INTERVAL
Elastica index settings object.
All settings listed in the update settings API (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html) can be changed on a running indices. To make changes like the merge policy (https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-merge.html) the index has to be closed first and reopened after the call
$_response : \Elastica\Response
Response.
$_index : \Elastica\Index
Index.
__construct(\Elastica\Index $index)
Construct.
\Elastica\Index | $index | Index object |
getBool(string $setting) : boolean
Returns a setting interpreted as a bool.
One can use a real bool, int(0), int(1) to set bool settings. But Elasticsearch stores and returns all settings as strings and does not normalize bool values. This method ensures a bool is returned for whichever string representation is used like 'true', '1', 'on', 'yes'.
string | $setting | Setting name to return |
setNumberOfReplicas(integer $replicas) : \Elastica\Response
Sets the number of replicas.
integer | $replicas | Number of replicas |
Response object
setReadOnly(boolean $readOnly = true) : \Elastica\Response
Sets the index to read only.
boolean | $readOnly | (default = true) |
setBlocksRead(boolean $state = true) : \Elastica\Response
boolean | $state | OPTIONAL (default = true) |
setBlocksWrite(boolean $state = true) : \Elastica\Response
boolean | $state | OPTIONAL (default = true) |
setBlocksMetadata(boolean $state = true) : \Elastica\Response
Set to true to disable index metadata reads and writes.
boolean | $state | OPTIONAL (default = true) |
setRefreshInterval(string $interval) : \Elastica\Response
Sets the index refresh interval.
Value can be for example 3s for 3 seconds or 5m for 5 minutes. -1 to disabled refresh.
string | $interval | Duration of the refresh interval |
Response object
setMergePolicy(string $key, string $value) : \Elastica\Response
Sets the specific merge policies.
To have this changes made the index has to be closed and reopened
string | $key | Merge policy key (for ex. expunge_deletes_allowed) |
string | $value |
set(array $data) : \Elastica\Response
Can be used to set/update settings.
array | $data | Arguments |
Response object
getIndex() : \Elastica\Index
Returns the index object.
Index object
request(array $data = array(), string $method = \Elastica\Request::GET) : \Elastica\Response
Updates the given settings for the index.
With elasticsearch 0.16 the following settings are supported
array | $data | OPTIONAL Data array |
string | $method | OPTIONAL Transfer method (default = \Elastica\Request::GET) |
Response object