SDK Javascript v5.x

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.

apply #

Applies the new mapping to the collection.

apply([options], [callback]) #

Arguments Type Description
options JSON Object Optional parameters
callback function Optional callback

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Return Value #

Returns this CollectionMapping object to allow chaining.

Callback Response #

Returns the updated CollectionMapping object.

Usage #

Copied to clipboard!
// Using callbacks (NodeJS or Web Browser)
dataMapping.apply(function (error, result) {
  // called once the mapping action has been completed
// Using promises (NodeJS)
dataMapping.applyPromise().then(function (error, result) {
  // resolved once the mapping action has been completed