SDK
SDK Golang v1.x
1

# 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

Copied to clipboard!
GetAutoRefresh(index string, options types.QueryOptions) (bool, error)
Arguments Type Description
index
string
Index name
options
QueryOptions
Query options

# Options

Additional query options

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

# Return

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

# Usage

Copied to clipboard!
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")
}