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.

SetAutoRefreshAsync #

The setAutoRefresh action updates the autorefresh flag for the provided index.

Each index has an autorefresh flag.
When set to true, each write request triggers a refresh action on 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 SetAutoRefreshAsync(string index , boolean autoRefresh);
ArgumentTypeDescription
index
string
Index name
autoRefresh
bool
autoRefresh flag

Usage #

await kuzzle.Index.SetAutoRefreshAsync("nyc-open-data", true);
Console.WriteLine("autorefresh flag is set to true");