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
Add a way to set array of types in match_mapping_type
#102807
Labels
>enhancement
:Search/Mapping
Index mappings, including merging and defining field types
Team:Search
Meta label for search team
Comments
eyalkoren
added
>enhancement
:Search/Mapping
Index mappings, including merging and defining field types
needs:triage
Requires assignment of a team area label
labels
Nov 30, 2023
Pinging @elastic/es-search (Team:Search) |
elasticsearchmachine
removed
the
needs:triage
Requires assignment of a team area label
label
Nov 30, 2023
Seems sensible to me. Also aligns with the short-term fix that I have in progress for #102794, which is to duplicate |
This sounds sensible, and goes in the same direction as #66364 but for match on type. |
This was referenced Dec 6, 2023
elasticsearchmachine
pushed a commit
that referenced
this issue
Dec 12, 2023
…ic templates (#103035) Add `match_mapping_type` to `ecs@mappings`'s `ecs_usage_scaled_float` (now split into two) dynamic templates, to avoid matching intermediate objects. For example, this avoids matching the `usage` object in `system.process.cgroup.memory.mem.usage.bytes`. This is a short term solution for #102794, to unblock using the apm-data plugin (whose templates include `ecs@mappings`). A better solution (compared to splitting the `ecs_usage_scaled_float` template) would be #102807.
martijnvg
pushed a commit
to martijnvg/elasticsearch
that referenced
this issue
Feb 12, 2024
Add an `unmatch_mapping_type` condition to dynamic templates (supporting one or more types), and add support for specifying a list of types to `match_mapping_type`. Closes elastic#102795 Closes elastic#102807
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>enhancement
:Search/Mapping
Index mappings, including merging and defining field types
Team:Search
Meta label for search team
Description
In addition or instead of #102795, it would be useful to be able to set multiple input JSON types for dynamic templates'
match_mapping_type
, for example:"match_mapping_type": ["string", "long", "double"]
.Otherwise, in order to achieve accurate dynamic templates we would need to duplicate them.
For example, consider the following use cases:
long
anddouble
are relevant, as well asstring
to allow for automatic numeric detectionstring
as well as numbers (not onlylong
, alsodouble
to support sub-millisecond-resolution representation of milliseconds)Since the number of possible input mapping types is very small, having this capability may make
unmatch_mapping_type
unnecessary.cc @axw
The text was updated successfully, but these errors were encountered: