Core
Framework v2.x
2

bootstrap #

Initializes the plugin private storage.

Can be called as much as needed as long as identical mappings are provided.

Arguments #

Copied to clipboard!
bootstrap(collections: JSONObject) => Promise<void>;

Arguments Type Description
collections
JSONObject
List of collections to create, with their corresponding mappings

Return #

The bootstrap function returns a promise, resolving once the storage is initialized.

Example #

Copied to clipboard!
const mappings = {
  collection1: {
    properties: {
      someField: {
        type: 'keyword'
      }
    }
  },
  collection2: {
    properties: {
      // ...
    }
  }
};

await context.accessors.storage.bootstrap(mappings);