SDK
SDK Javascript v7.x
2

delete #

Deletes a collection.


Copied to clipboard!
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 #

Copied to clipboard!
try {
  await kuzzle.collection.delete('nyc-open-data', 'yellow-taxi');
  console.log('Success');
} catch (error) {
  console.error(error.message);
}