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

Mapping parameters #2084

Merged
merged 3 commits into from Feb 28, 2023
Merged

Mapping parameters #2084

merged 3 commits into from Feb 28, 2023

Conversation

ralphm
Copy link
Contributor

@ralphm ralphm commented Oct 31, 2022

When attempting to create a custom mapping for a date (multi-)field, I found that the ECS tooling doesn't currently support providing the ignore_malformed and format mapping parameters. Even though there is some limited support for certain parameters, these are not consistent between the main field mapping and the multi-field mapping. E.g. the normalizer parameter is only available for multi-fields.

Instead of implementing specific parameters for my use case, this PR adds a new property parameters to provide any mapping parameter, both for the main field and for multi-fields, along with a minimal test for the multi-field generation code. The existing code can remain as-is, with the minimal sanity checking that is in place, for backwards compatibility.

@ralphm ralphm requested a review from a team as a code owner October 31, 2022 15:54
@github-actions
Copy link

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale Stale issues and pull requests label Dec 31, 2022
@ralphm
Copy link
Contributor Author

ralphm commented Jan 31, 2023

Any chance this can get a review? The merge conflict is trivial, and I'll be happy to resolve that when the time comes.

@github-actions github-actions bot removed the stale Stale issues and pull requests label Feb 1, 2023
Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ralphm this looks like a great add. Once the merge conflict is resolved, I will approve and merge.

This adds a `parameters` property to provide mapping parameters that are
not explicitly whitelisted otherwise.
This also adds a minimal test for the existing multi-field code, which
had no coverage, yet.
@kgeller kgeller merged commit 68f90ff into elastic:main Feb 28, 2023
@ralphm
Copy link
Contributor Author

ralphm commented Feb 28, 2023

Thanks, @kgeller!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants