Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

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 #

Copied to clipboard!
URL: http://kuzzle:7512/<index>/_autoRefresh
Method: POST
Copied to clipboard!
{
  "autoRefresh": <boolean>
}

Other protocols #

Copied to clipboard!
{
  "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 index autoRefresh flag

Response #

Returns an object confirming the new value of the autoRefresh index property.

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "controller": "index",
  "action": "setAutoRefresh",
  "requestId": "<unique request identifier>",
  "result": {
    "response": true
  }
}

Possible errors #