mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
25aac4f77f
The "include_type_name" parameter was temporarily introduced in #37285 to facilitate moving the default parameter setting to "false" in many places in the documentation code snippets. Most of the places can simply be reverted without causing errors. In this change I looked for asciidoc files that contained the "include_type_name=true" addition when creating new indices but didn't look likey they made use of the "_doc" type for mappings. This is mostly the case e.g. in the analysis docs where index creating often only contains settings. I manually corrected the use of types in some places where the docs still used an explicit type name and not the dummy "_doc" type.
95 lines
1.8 KiB
Plaintext
95 lines
1.8 KiB
Plaintext
[role="xpack"]
|
|
[testenv="basic"]
|
|
[[ilm-remove-policy]]
|
|
=== Remove policy from index API
|
|
++++
|
|
<titleabbrev>Remove policy</titleabbrev>
|
|
++++
|
|
|
|
Removes the assigned lifecycle policy from an index.
|
|
|
|
==== Request
|
|
|
|
`POST <index>/_ilm/remove`
|
|
|
|
==== Description
|
|
|
|
Removes the assigned lifecycle policy and stops managing the specified index.
|
|
If an index pattern is specified, removes the assigned policies from all matching
|
|
indices.
|
|
|
|
==== Path Parameters
|
|
|
|
`index` (required)::
|
|
(string) Identifier for the index.
|
|
|
|
==== Request Parameters
|
|
|
|
include::{docdir}/rest-api/timeoutparms.asciidoc[]
|
|
|
|
==== Authorization
|
|
|
|
You must have the `manage_ilm` privileges on the indices being managed to use this API.
|
|
For more information, see {stack-ov}/security-privileges.html[Security Privileges].
|
|
|
|
==== Examples
|
|
|
|
The following example removes the assigned policy from `my_index`.
|
|
|
|
//////////////////////////
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
PUT _ilm/policy/my_policy
|
|
{
|
|
"policy": {
|
|
"phases": {
|
|
"warm": {
|
|
"min_age": "10d",
|
|
"actions": {
|
|
"forcemerge": {
|
|
"max_num_segments": 1
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"min_age": "30d",
|
|
"actions": {
|
|
"delete": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
PUT my_index
|
|
{
|
|
"settings": {
|
|
"index.lifecycle.name": "my_policy"
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST
|
|
|
|
//////////////////////////
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
POST my_index/_ilm/remove
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST[continued]
|
|
|
|
If the request succeeds, you receive the following result:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{
|
|
"has_failures" : false,
|
|
"failed_indexes" : []
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TESTRESPONSE
|