Delete the indices for a single type

delete/admin/indices/{type}
Internal-Use Only

Deletes the index (and therefore indexed data) for a specified type. This operation cannot be undone without first making a backup of the indexed data directly from the underlying search engine. No error will be reported when the index has already been deleted. If the intention is to reload the data after deleting the index, the recreate parameter should be set to true otherwise a POST request to /admin/indices/{type} will be required to create an empty index prior to reloading the data.

Request Samples

1

Response Samples

1No example avaliable

Path Parameters

NameTypeRequiredDescription
type
string
true

The name of the type.

Query Parameters

NameTypeRequiredDescription
preserveNewestIndexName
boolean
false

Whether to preserve and reuse the name of the newest index when creating the next searchable index. Creating a new unsearchable index, or deleting an index without this option, will cause the new index to have a new unique name. Preserving the newest index name is useful when maintaining a read-only standby deployment for Disaster Avoidance as it allows the data to be re-indexed without changing the name. For example, when applying a breaking configuration change from the active deployment.

Default:
false
recreate
boolean
false

Whether to create a new empty index for the type after deleting the current one.

Default:
false
unsearchableOnly
boolean
false

Whether to delete only the unsearchable indices. This is useful for cleaning up after a failed indexing attempt.

Default:
false
waitForRefresh
boolean
false

Whether to wait for any index-related operations to be applied prior to the response being returned.

Default:
false

Responses

StatusMeaningDescription
204No ContentThe request succeeded.
404Not FoundThe type does not exist or it is not configured to be indexed for search.Schema