refreshIndex

kuzzle.refreshIndex('myIndex');
kuzzle.refreshIndex("myIndex");
<?php
use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $kuzzle->refreshIndex('myIndex');
}
catch (ErrorException $e) {

}

When writing or deleting documents in Kuzzle, the update needs to be indexed before being reflected in the search index.
By default, this operation can take up to 1 second.

Given an index, the refresh action forces a refresh, on it, making the documents visible to search immediately.


refreshIndex([index], [options], [callback])

Argument Type Description
index string Optional. The index to refresh. If not set, defaults to kuzzle.defaultIndex.
options JSON object Optional parameters
callback function Optional. Callback handling the response.

Options

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

Return Value

Returns the Kuzzle SDK object to allow chaining.


Callback Response

Returns a JSON structure matching the response from Elasticsearch.