-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Change how max_matches
affects target_field
option.
#47982
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
Conversation
Prior to this change the `target_field` would always be a json array field in the document being ingested. This to take into account that multiple enrich documents could be inserted into the `target_field`. However the default `max_matches` is `1`. Meaning that by default only a single enrich document would be added to `target_field` json array field. This commit changes this; if `max_matches` is set to `1` then the single document would be added as a json object to the `target_field` and if it is configured to a higher value then the enrich documents will be added as a json array (even if a single enrich document happens to be enriched).
Pinging @elastic/es-core-features (:Core/Features/Ingest) |
@elasticmachine run elasticsearch-ci/2 |
@martijnvg I pushed f047228, which included some additional doc changes that were needed. Please feel free to adjust these. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@elasticmachine run elasticsearch-ci/packaging-sample |
Prior to this change the `target_field` would always be a json array field in the document being ingested. This to take into account that multiple enrich documents could be inserted into the `target_field`. However the default `max_matches` is `1`. Meaning that by default only a single enrich document would be added to `target_field` json array field. This commit changes this; if `max_matches` is set to `1` then the single document would be added as a json object to the `target_field` and if it is configured to a higher value then the enrich documents will be added as a json array (even if a single enrich document happens to be enriched).
Prior to this change the
target_field
would always be a json arrayfield in the document being ingested. This to take into account that
multiple enrich documents could be inserted into the
target_field
.However the default
max_matches
is1
. Meaning that by defaultonly a single enrich document would be added to
target_field
jsonarray field.
This commit changes this; if
max_matches
is set to1
then the singledocument would be added as a json object to the
target_field
andif it is configured to a higher value then the enrich documents will be
added as a json array (even if a single enrich document happens to be
enriched).