setAutoRefresh #
Changes the autoRefresh configuration of an index.
The autoRefresh flag, when set to true, tells Kuzzle to perform an immediate refresh request after each write request, instead of waiting the regular refreshes occuring every seconds.
Note: refreshes come with performance costs. Set the autoRefresh flag to true only for indexes needing changes to be immediately available through searches, and only for slowly changing indexes.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/<index>/_autoRefresh
Method: POST{
"autoRefresh": <boolean>
}Other protocols #
{
"index": "<index>",
"controller": "index",
"action": "setAutoRefresh",
"body": {
"autoRefresh": <boolean>
}
}Arguments #
index: index name to configure
Body properties #
autoRefresh: a boolean value describing the state of the indexautoRefreshflag
Response #
Returns an object confirming the new value of the autoRefresh index property.
{
"status": 200,
"error": null,
"index": "<index>",
"controller": "index",
"action": "setAutoRefresh",
"requestId": "<unique request identifier>",
"result": {
"response": true
}
}