code | type | title |
---|---|---|
true |
page |
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.
URL: http://kuzzle:7512/<index>/_autoRefresh
Method: POST
{
"autoRefresh": <boolean>
}
{
"index": "<index>",
"controller": "index",
"action": "setAutoRefresh",
"body": {
"autoRefresh": <boolean>
}
}
index
: index name to configure
autoRefresh
: a boolean value describing the state of the indexautoRefresh
flag
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
}
}