delete() #

Deletes a document.

Arguments #

delete (id: string, options?: JSONObject): Promise<void>;

ArgumentsTypeDescription
id
string
Document unique identifier
options
JSONObject
Optional arguments

options #

The options argument accepts the following parameters:

OptionsTypeDescription
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');