Skip to content

Commit 2ce7581

Browse files
authored
[Docs] Update remove processor with 'keep' option (#92836) (#92838)
1 parent a4bcdc7 commit 2ce7581

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/reference/ingest/processors/remove.asciidoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Removes existing fields. If one field doesn't exist, an exception will be thrown
1313
| Name | Required | Default | Description
1414
| `field` | yes | - | Fields to be removed. Supports <<template-snippets,template snippets>>.
1515
| `ignore_missing` | no | `false` | If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document
16+
| `keep` | no | - | Fields to be kept. When set, all fields other than those specified are removed.
1617
include::common-options.asciidoc[]
1718
|======
1819

@@ -39,3 +40,15 @@ To remove multiple fields, you can use the following query:
3940
}
4041
--------------------------------------------------
4142
// NOTCONSOLE
43+
44+
You can also choose to remove all fields other than a specified list:
45+
46+
[source,js]
47+
--------------------------------------------------
48+
{
49+
"remove": {
50+
"keep": ["url"]
51+
}
52+
}
53+
--------------------------------------------------
54+
// NOTCONSOLE

0 commit comments

Comments
 (0)