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
on it, making the documents visible to search immediately.
A refresh operation comes with some performance costs.
From the Elasticsearch documentation:
"While a refresh is much lighter than a commit, it still has a performance cost. A manual refresh can be useful when writing tests, but don’t do a manual refresh every time you index a document in production; it will hurt your performance. Instead, your application needs to be aware of the near real-time nature of Elasticsearch and make allowances for it."
| ||string||Optional. The index to refresh. If not set, defaults to kuzzle.defaultIndex.|
| ||JSON object||Optional parameters|
| ||function||Optional. Callback handling the response.|
| ||boolean||Make this request queuable or not|
Kuzzle SDK object to allow chaining.
Returns a JSON structure matching the response from Elasticsearch.