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 a collection exists in Kuzzle.

Arguments #

Copied to clipboard!
Exists(index string, collection string, options types.QueryOptions) (bool, error)
Arguments Type Description
index
string
Index name
collection
string
Collection name
options
types.QueryOptions
An object containing query options

options #

Additional query options

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

Return #

True if the collection exists

Usage #

Copied to clipboard!
exists, err := kuzzle.Collection.Exists("nyc-open-data", "green-taxi", nil)
if err != nil {
  log.Fatal(err)
} else if exists {
  fmt.Println("Success")
}