Exists #
Checks if the given index exists in Kuzzle.
Arguments #
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 #
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")
}
Edit this page on Github(opens new window)