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 #

bootstrap(collections: JSONObject) => Promise<void>;

ArgumentsTypeDescription
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 #

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

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