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

Support field type overrides by creating custom overrides component template. #15978

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

dennisoelkers
Copy link
Member

@dennisoelkers dennisoelkers commented Jul 18, 2023

Note: This requires #15948 to be merged before.

Description

Motivation and Context

This PR is making use composable templates introduced in #15948 by splitting up the composable index template used for each index set into two component templates:

  • <index set prefix>-base: containing the general mappings defined by the index template type
  • <index set prefix>-overrides: containing the user-defined, index set specific type overrides/additions

Both component templates are created upon index rotation if they do not exist. The -base component template is populated with the pre-defined mappings, based on the index template type of the index set. The -overrides component template will be created empty if it does not exist, but if it exists, it will not be touched so user changes will not be lost during index rotation.

These component templates are used when configuring the composable index template matching the prefix of the index set's indices. The -overrides component template has precedence, so it allows users to override even field types for e.g. the source field.

Fixes #15394.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@dennisoelkers dennisoelkers force-pushed the feat/support-field-type-overrides branch from 00e22c4 to 86359e0 Compare July 20, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow index mapping for Source field to be optionally set to keyword
1 participant