Skip to content

Conversation

jordan-powers
Copy link
Contributor

Currently we always set the index.mapping.pattern_text.disable_templating setting for every standard-mode index.
This is a bit excessive, so this PR updates the logic to only include the setting if pattern_text field mappers are in use.

Instantiating a whole mapper service just to check for the existence of a PatternedTextMapper would be fairly expensive. So instead this patch simply checks the mapping source for the string "pattern_text". While there may be some false positives, the only overhead of a false positive is that a single index setting is set and then ignored.

This is an alternate approach to #135553

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

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

Successfully merging this pull request may close these issues.

2 participants