-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Introduce MAPPING_AUTO_UPDATE merge reason #104769
Introduce MAPPING_AUTO_UPDATE merge reason #104769
Conversation
This is in preparation of elastic#96235. At the moment, there's no difference between MAPPING_AUTO_UPDATE and MAPPING_AUTO_UPDATE_PREFLIGHT. After the other PR is merged, when the merge reason is auto-update and if ignore_dynamic_beyond_limit is set, the merge process will only add dynamically mapped fields until the field limit is reached and ignores additional ones.
Pinging @elastic/es-distributed (Team:Distributed) |
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.
Looks good. I found a few additional potential changes.
Also, I would like to have the new constant used more in tests, for instance randomly in MapperServiceTests
and DocumentMapperTests
(I think all tests there would pass with both so choosing a random one would make sense to me).
server/src/main/java/org/elasticsearch/cluster/metadata/MetadataMappingService.java
Show resolved
Hide resolved
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.
) Adds a new `index.mapping.total_fields.ignore_dynamic_beyond_limit` index setting. When set to `true`, new fields are added to the mapping as long as the field limit (`index.mapping.total_fields.limit`) is not exceeded. Fields that would exceed the limit are not added to the mapping, similar to `dynamic: false`. Ignored fields are added to the `_ignored` metadata field. Relates to #89911 To make this easier to review, this is split into the following PRs: - [x] #102915 - [x] #102936 - [x] #104769 Related but not a prerequisite: - [ ] #102885
This is in preparation of #96235. At the moment, there's no difference between MAPPING_AUTO_UPDATE and MAPPING_AUTO_UPDATE_PREFLIGHT.
After the other PR is merged, when the merge reason is auto-update and if ignore_dynamic_beyond_limit is set, the merge process will only add dynamically mapped fields until the field limit is reached and ignores additional ones.