?
dataSources.ensure
Creates the corpus if it does not exist yet, without adding a document.
DataSource.ensure(name?) → void
Creates the corpus if it does not exist yet, without adding a document. It is rarely needed, since both add and search handle a missing corpus on their own; reach for it only when you want the corpus to exist, and to appear in the dashboard, before any document has been added.
Parameters
name
string
Override the handle's name.
Create up front
await Policies.ensure(); // visible in the dashboard before any document