Delete Document Command

  • Use the DeleteDocumentCommand to remove a document from the database.

  • In this page:


Example

// Define the Delete Command
// Pass the document ID & whether to make concurrency checks
const deleteDocCmd = new DeleteDocumentCommand("employees/1-A", null);

// Send the command to the server using the RequestExecutor
await documentStore.getRequestExecutor().execute(deleteDocCmd);

Syntax

DeleteDocumentCommand(id, changeVector);
Parameter Type Description
id string ID of a document to be deleted
changeVector string Entity changeVector, used for concurrency checks (null to skip check)