registerMappingEvents() {
    /**
     * Return a collection's mapping
     *
     * @param {string} index
     * @param {string} collection
     * @param {Object} [opts] -- see Elasticsearch "getMapping" options
     *
     * @returns {Promise.<{ dynamic, _meta, properties }>}
     */
    global.kuzzle.onAsk(
      `core:storage:${this.scope}:mappings:get`,
      (index, collection, opts) => {
        this.cache.assertCollectionExists(index, collection);
        return this.client.getMapping(index, collection, opts);
      },
    );

    /**
     * Import mappings as fixtures. Create non-existing indexes and collections
     * in the process.
     *
     * @param  {Object} fixtures
     * @param  {Object} options
     * @return {Promise}
     */
    global.kuzzle.onAsk(
      `core:storage:${this.scope}:mappings:import`,
      (fixtures, options) => this.loadMappings(fixtures, options),
    );

    /**
     * Update a collection mappings
     *
     * @param {string} index
     * @param {string} collection
     * @param {Object} mappings
     * @returns {Promise.<{ dynamic, _meta, properties }>}
     */
    global.kuzzle.onAsk(
      `core:storage:${this.scope}:mappings:update`,
      (index, collection, mappings) => {
        this.cache.assertCollectionExists(index, collection);
        return this.client.updateMapping(index, collection, mappings);
      },
    );
  }
Applies a partial update to an existing document.
If the document doesn't already exist, a new document is created.

@param {string} index
@param {string} collection
@param {string} id -- document unique identifier
@param {Object} content -- partial content to update
@param {Object} [opts] -- see Elasticsearch "upsert" options
@returns {Promise.<{ _id, _version }>}