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>;
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 #
const mappings = {
collection1: {
properties: {
someField: {
type: 'keyword'
}
}
},
collection2: {
properties: {
// ...
}
}
};
await context.accessors.storage.bootstrap(mappings);
Edit this page on Github(opens new window)