Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Update remove processor with 'keep' option #92836

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/reference/ingest/processors/remove.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<template-snippets,template snippets>>.
| `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[]
|======

Expand All @@ -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