SDK
SDK PHP v3.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.

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) #

ArgumentsTypeDescription
indexstringOptional index to query. If no set, defaults to Kuzzle.defaultIndex
optionsJSON objectOptional parameters
callbackfunctionCallback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns a boolean with the index autoRefresh status.

Usage #

<?php
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
$result = $kuzzle->getAutoRefresh('myIndex');
// $result = true | false