76 lines
1.4 KiB
Plaintext
76 lines
1.4 KiB
Plaintext
[role="xpack"]
|
|
[testenv="basic"]
|
|
[[delete-enrich-policy-api]]
|
|
=== Delete enrich policy API
|
|
++++
|
|
<titleabbrev>Delete enrich policy</titleabbrev>
|
|
++++
|
|
|
|
Deletes an existing <<enrich-policy,enrich policy>> and its
|
|
<<enrich-index,enrich index>>.
|
|
|
|
////
|
|
[source,console]
|
|
----
|
|
PUT /users
|
|
{
|
|
"mappings": {
|
|
"properties": {
|
|
"email": { "type": "keyword" }
|
|
}
|
|
}
|
|
}
|
|
|
|
PUT /_enrich/policy/my-policy
|
|
{
|
|
"match": {
|
|
"indices": "users",
|
|
"match_field": "email",
|
|
"enrich_fields": [ "first_name", "last_name", "city", "zip", "state" ]
|
|
}
|
|
}
|
|
----
|
|
// TESTSETUP
|
|
////
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_enrich/policy/my-policy
|
|
--------------------------------------------------
|
|
|
|
|
|
[[delete-enrich-policy-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`DELETE /_enrich/policy/<enrich-policy>`
|
|
|
|
|
|
[[delete-enrich-policy-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
include::put-enrich-policy.asciidoc[tag=enrich-policy-api-prereqs]
|
|
|
|
|
|
[[delete-enrich-policy-api-desc]]
|
|
==== {api-description-title}
|
|
|
|
Use the delete enrich policy API
|
|
to delete an existing enrich policy
|
|
and its enrich index.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
You must remove an enrich policy
|
|
from any in-use ingest pipelines
|
|
before deletion.
|
|
You cannot remove in-use enrich policies.
|
|
====
|
|
|
|
|
|
[[delete-enrich-policy-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<enrich-policy>`::
|
|
(Required, string)
|
|
Enrich policy to delete.
|