delete #
Deletes a collection.
delete(index, collection);
Arguments | Type | Description |
---|---|---|
index | string | Index name |
collection | string | Collection name |
options | object | Query options |
Options #
Additional query options
Options | Type (default) | Description |
---|---|---|
timeout | number ( -1 ) | Time (in ms) during which a request will still be waited to be resolved. Set it -1 if you want to wait indefinitely |
Resolves #
Resolves if the collection is successfully deleted.
Usage #
try {
await kuzzle.collection.delete('nyc-open-data', 'yellow-taxi');
console.log('Success');
} catch (error) {
console.error(error.message);
}
Edit this page on Github (opens new window)