Exists

Checks if the given index exists in Kuzzle.

Arguments

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

Usage

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