SDK
SDK Golang 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.

GetAutoRefresh #

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

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

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 #

GetAutoRefresh(index string, options types.QueryOptions) (bool, error)
ArgumentsTypeDescription
index
string
Index name
options
QueryOptions
Query options

Options #

Additional query options

OptionTypeDescriptionDefault
queuable
bool
Make this request queuable or nottrue

Return #

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

Usage #

status, err := kuzzle.Index.GetAutoRefresh("nyc-open-data", nil)
if err != nil {
  log.Fatal(err)
} else if status == true {
  fmt.Println("autorefresh is true")
} else {
  fmt.Println("autorefresh is false")
}