SDK
SDK C# 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.

GetAutoRefreshAsync #

The getAutoRefresh action returns the current autorefresh status for the index.

Each index has an autorefresh flag.
When set to true, each write request triggers a refresh action in Elasticsearch.
Without a refresh after a write request, the documents may not be immediately available in search results.

A refresh operation comes with some performance costs.
While forcing the autoRefresh can be convenient on a development or test environment,
we recommend that you avoid using it in production or at least carefully monitor its implications before using it.

Arguments #

Task<bool> GetAutoRefreshAsync(string index);
ArgumentTypeDescription
index
string
Index name

Return #

Returns a bool that indicate the status of the autoRefresh flag.

Usage #

if (await kuzzle.Index.GetAutoRefreshAsync("nyc-open-data")) {
  Console.WriteLine("autorefresh is true");
} else {
  Console.WriteLine("autorefresh is false");
}