From 0e5a238da97fda009a757fb7b164f06bb4ccbaf4 Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Wed, 11 Jan 2023 12:52:35 -0500 Subject: [PATCH] [Docs] Update remove processor with 'keep' option (#92836) --- docs/reference/ingest/processors/remove.asciidoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/reference/ingest/processors/remove.asciidoc b/docs/reference/ingest/processors/remove.asciidoc index 6e9b4f24ff515..c3aa42a8f1807 100644 --- a/docs/reference/ingest/processors/remove.asciidoc +++ b/docs/reference/ingest/processors/remove.asciidoc @@ -13,6 +13,7 @@ Removes existing fields. If one field doesn't exist, an exception will be thrown | Name | Required | Default | Description | `field` | yes | - | Fields to be removed. Supports <>. | `ignore_missing` | no | `false` | If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document +| `keep` | no | - | Fields to be kept. When set, all fields other than those specified are removed. include::common-options.asciidoc[] |====== @@ -39,3 +40,15 @@ To remove multiple fields, you can use the following query: } -------------------------------------------------- // NOTCONSOLE + +You can also choose to remove all fields other than a specified list: + +[source,js] +-------------------------------------------------- +{ + "remove": { + "keep": ["url"] + } +} +-------------------------------------------------- +// NOTCONSOLE