Files
elasticsearch-js/docs/reference/api/DeleteRequest.md
2025-05-28 10:02:30 -05:00

2.5 KiB

DeleteRequest [interface-DeleteRequest]

Name Type Description
body string ({ [key: string]: any; } & { id?: never; index?: never; if_primary_term?: never; if_seq_no?: never; refresh?: never; routing?: never; timeout?: never; version?: never; version_type?: never; wait_for_active_shards?: never; })
id Id A unique identifier for the document.
if_primary_term long Only perform the operation if the document has this primary term.
if_seq_no SequenceNumber Only perform the operation if the document has this sequence number.
index IndexName The name of the target index.
querystring { [key: string]: any; } & { id?: never; index?: never; if_primary_term?: never; if_seq_no?: never; refresh?: never; routing?: never; timeout?: never; version?: never; version_type?: never; wait_for_active_shards?: never; } All values in querystring will be added to the request querystring.
refresh Refresh If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If wait_for, it waits for a refresh to make this operation visible to search. If false, it does nothing with refreshes.
routing Routing A custom value used to route operations to a specific shard.
timeout Duration The period to wait for active shards. This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs. Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation. By default, the delete operation will wait on the primary shard to become available for up to 1 minute before failing and responding with an error.
version_type VersionType The version type.
version VersionNumber An explicit version number for concurrency control. It must match the current version of the document for the request to succeed.
wait_for_active_shards WaitForActiveShards The minimum number of shard copies that must be active before proceeding with the operation. You can set it to all or any positive integer up to the total number of shards in the index ( number_of_replicas+1). The default value of 1 means it waits for each primary shard to be active.