SDK
SDK Golang v2.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 #

Exists(index string, collection string, options types.QueryOptions) (bool, error)
ArgumentsTypeDescription
index
string
Index name
collection
string
Collection name
options
types.QueryOptions
An object containing query options

options #

Additional query options

PropertyTypeDescriptionDefault
queuable
bool
Make this request queuable or nottrue

Return #

True if the collection exists

Usage #

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