SDK
SDK Golang v3.x
2

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")
}