原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/put-enrich-policy-api.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/put-enrich-policy-api.html
本地英文版地址: ../en/put-enrich-policy-api.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Put enrich policy APIedit
Creates an enrich policy.
PUT /_enrich/policy/my-policy { "match": { "indices": "users", "match_field": "email", "enrich_fields": ["first_name", "last_name", "city", "zip", "state"] } }
Requestedit
PUT /_enrich/policy/<enrich-policy>
Prerequisitesedit
If you use Elasticsearch security features, you must have:
-
read
index privileges for any indices used -
The
enrich_user
built-in role
Descriptionedit
Use the put enrich policy API to create a new enrich policy.
Once created, you can’t update or change an enrich policy. Instead, you can:
- Create and execute a new enrich policy.
- Replace the previous enrich policy with the new enrich policy in any in-use enrich processors.
- Use the delete enrich policy API to delete the previous enrich policy.
Path parametersedit
-
<enrich-policy>
- (Required, string) Enrich policy name used to limit the request.
Request bodyedit
-
<policy-type>
-
(Required, enrich policy object) Enrich policy used to match and add the right enrich data to the right incoming documents.
See Enrich policy definition for object definition and parameters.