Skip to content

Add mapper_type and mapper_settings to IngestionSource schema - #1155

Merged
karenyrx merged 6 commits into
opensearch-project:mainfrom
imRishN:add-mapper-type-settings
Jul 6, 2026
Merged

Add mapper_type and mapper_settings to IngestionSource schema#1155
karenyrx merged 6 commits into
opensearch-project:mainfrom
imRishN:add-mapper-type-settings

Conversation

@imRishN

@imRishN imRishN commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds IngestionSourceMapperType enum with values default, raw_payload, field_mapping
  • Adds mapper_type property to IngestionSource schema referencing the new enum
  • Adds mapper_settings property to IngestionSource schema as an object with string additionalProperties (for field_mapping config keys: id_field, version_field, op_type_field, op_type_field.delete_value, op_type_field.create_value)

Companion Server PRs

Test plan

  • Verify schema validates against a running OpenSearch instance with the server-side changes

🤖 Generated with Claude Code

Companion spec change for opensearch-project/OpenSearch#20722 and
opensearch-project/OpenSearch#20729 which added configurable message
mapping to pull-based ingestion.

Adds:
- IngestionSourceMapperType enum (default, raw_payload, field_mapping)
- mapper_type property on IngestionSource
- mapper_settings property on IngestionSource (additionalProperties for
  field_mapping keys: id_field, version_field, op_type_field, etc.)

Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread spec/schemas/indices._common.yaml Outdated
mapper_settings:
type: object
description: Configuration settings for the selected mapper type. For `field_mapping`, supports `id_field`, `version_field`, `op_type_field`, `op_type_field.delete_value`, and `op_type_field.create_value`.
additionalProperties:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can keep it same as params for flexibility based on OS setting definition.

Matches param pattern for forward compatibility with future mapper
types that may require non-string values.

Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid listing specific keys that may change across mapper types and
versions.

Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
karenyrx
karenyrx previously approved these changes Jul 5, 2026
- kafka
- kinesis
- none
IngestionSourceMapperType:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Version-gated to >=3.6 since mapper_type is introduced in that version.
Uses file-based ingestion (no Kafka dependency) to validate that
mapper_type and mapper_settings are accepted in index creation.

Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moved index creation from prologue to a chapter so we can assert
acknowledged/shards_acknowledged. The GET chapter now verifies that
mapper_type and mapper_settings values are returned correctly in the
index settings response.

Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@karenyrx
karenyrx merged commit 2146d3b into opensearch-project:main Jul 6, 2026
33 of 35 checks passed
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.

3 participants