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.

Exists #

Checks if the given index exists in Kuzzle.

Arguments #

Exists(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 whether the index exists, or an error

Usage #

exists, err := kuzzle.Index.Exists("nyc-open-data", nil)
if err != nil {
  log.Fatal(err)
} else if exists == true {
  fmt.Println("index exists")
} else {
  fmt.Println("index does not exist")
}