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.

GetMapping #

Returns the mapping for the given collection.

Arguments #

GetMapping(index string, collection string, options types.QueryOptions) (json.RawMessage, error)
ArgumentsTypeDescription
index
string
Index name
collection
string
Collection name
options
types.QueryOptions
Query options

options #

Additional query options

PropertyTypeDescriptionDefault
queuable
bool
Make this request queuable or nottrue

Return #

Return a json representation of the mapping and an error is something was wrong.

Usage #

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