SDK PHP v3.x

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.

getAutoRefresh #

The autoRefresh flag, when set to true, will make Kuzzle perform a refresh request immediately after each write request, causing documents to be immediately visible in a search.

The getAutoRefresh function returns the current autoRefresh status for the given index.

A refresh operation comes with some performance costs.

While forcing the autoRefresh can be convenient on a development or test environmnent, we recommend that you avoid using it in production or at least carefully monitor its implications before using it.

getAutoRefresh([index], [options], callback) #

Arguments Type Description
index string Optional index to query. If no set, defaults to Kuzzle.defaultIndex
options JSON object Optional parameters
callback function Callback handling the response

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Callback Response #

Returns a boolean with the index autoRefresh status.

Usage #

Copied to clipboard!
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
$result = $kuzzle->getAutoRefresh('myIndex');
// $result = true | false