delete() #
Deletes a document.
Arguments #
delete (id: string, options?: JSONObject): Promise<void>;| Arguments | Type | Description |
|---|---|---|
id | string | Document unique identifier |
options | JSONObject | Optional arguments |
options #
The options argument accepts the following parameters:
| Options | Type | Description |
|---|---|---|
refresh | string | If set with the wait_for string value, then the function will respond only after the document has been indexed |
Return #
The delete function returns a promise, resolving once the document is deleted. It resolves to nothing.
Example #
await repository.delete('someDocumentId');