Back to Elasticsearch

Remove processor [remove-processor]

docs/reference/enrich-processor/remove-processor.md

9.4.01.9 KB
Original Source

Remove processor [remove-processor]

Removes existing fields. If one field doesn’t exist, an exception will be thrown.

$$$remove-options$$$

NameRequiredDefaultDescription
fieldyes-Fields to be removed. Supports template snippets. This parameter is not required if you use keep instead.
ignore_missingnofalseIf true and field does not exist or is null, the processor quietly exits without modifying the document
keepno-Fields to keep. When set, all fields other than those specified are removed.
descriptionno-Description of the processor. Useful for describing the purpose of the processor or its configuration.
ifno-Conditionally execute the processor. See Conditionally run a processor.
ignore_failurenofalseIgnore failures for the processor. See Handling pipeline failures.
on_failureno-Handle failures for the processor. See Handling pipeline failures.
tagno-Identifier for the processor. Useful for debugging and metrics.

Here is an example to remove a single field:

js
{
  "remove": {
    "field": "user_agent"
  }
}

% NOTCONSOLE

To remove multiple fields, you can use the following query:

js
{
  "remove": {
    "field": ["user_agent", "url"]
  }
}

% NOTCONSOLE

You can also choose to remove all fields other than a specified list:

js
{
  "remove": {
    "keep": ["url"]
  }
}

% NOTCONSOLE