Add only enrich_fields to documents when using Enrich Processors #74217
Labels
:Data Management/Ingest Node
Execution or management of Ingest Pipelines including GeoIP
>enhancement
Team:Data Management
Meta label for data/management team
The way Enrich processors work right now, the
match_field
is added to input documents, along with theenrich_fields
. Per the docs, onlyenrich_fields
should be added as enrichments to input documents.Here's presenting two cases for an example enrich policy and the effects of adding
match_field
to the enriched output:match_field
in the enrich policy appears in both, the input documents and the enrich documentsmatch_field
in the enrich policy, is not present in input documentEg: For an enrich policy setup as follows:
match_field
in the enrich policy appears in both, the input documents and the enrich documentsSample input document:
Corresponding enrich processor:
Resulting enriched document:
Observation: The
match_field
is merged with the inputfield
and appears in addition to theenrich_fields
under thetarget_field
in the enriched documents. This is not ideal if users want the original fields in their input documents to be untouched.match_field
in the enrich policy, is not present in input documentSample input document:
Corresponding enrich processor:
Resulting enriched document:
Observation: The
match_field
appears in addition to theenrich_fields
under thetarget_field
in the enriched documents. Addingmatch_field
to the enrich documents is unnecessary and by definition,enrich_fields
are the only fields that the input documents should be enriched with.cc: @martijnvg
The text was updated successfully, but these errors were encountered: