delete

edit
client.delete({
  id: string,
  index: string,
  type: string,
  wait_for_active_shards: string,
  parent: string,
  refresh: 'true' | 'false' | 'wait_for',
  routing: string,
  timeout: string,
  if_seq_no: number,
  if_primary_term: number,
  version: number,
  version_type: 'internal' | 'external' | 'external_gte' | 'force'
})

Reference

id

string - The document ID

index

string - The name of the index

type

string - The type of the document

wait_for_active_shards or waitForActiveShards

string - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)

parent

string - ID of parent document

refresh

'true' | 'false' | 'wait_for' - If true then refresh the effected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false (the default) then do nothing with refreshes.

routing

string - Specific routing value

timeout

string - Explicit operation timeout

if_seq_no or ifSeqNo

number - only perform the delete operation if the last operation that has changed the document has the specified sequence number

if_primary_term or ifPrimaryTerm

number - only perform the delete operation if the last operation that has changed the document has the specified primary term

version

number - Explicit version number for concurrency control

version_type or versionType

'internal' | 'external' | 'external_gte' | 'force' - Specific version type