-
Notifications
You must be signed in to change notification settings - Fork 140
Add mapper_type and mapper_settings to IngestionSource schema #1155
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
Merged
karenyrx
merged 6 commits into
opensearch-project:main
from
imRishN:add-mapper-type-settings
Jul 6, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c6c9c27
Add mapper_type and mapper_settings to IngestionSource schema
imRishN b8e6936
Fix lint (sort enum values) and add changelog entry
imRishN 8bdcf4f
Change mapper_settings to additionalProperties: true
imRishN e899021
Generalize mapper_settings description
imRishN 4c894d3
Add test for mapper_type and mapper_settings in ingestion settings
imRishN 63d9ab1
Add response payload assertions to mapper_settings test
imRishN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
tests/plugins/ingestion-fs/pull_based_ingestion/mapper_settings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| $schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
|
||
| description: Test pull-based ingestion with mapper_type and mapper_settings. | ||
| version: '>=3.6' | ||
| prologues: [] | ||
| epilogues: | ||
| - path: /test-mapper-index | ||
| method: DELETE | ||
| status: [200, 404] | ||
| chapters: | ||
| - synopsis: Create an index with mapper_type and mapper_settings. | ||
| path: /{index} | ||
| method: PUT | ||
| parameters: | ||
| index: test-mapper-index | ||
| request: | ||
| payload: | ||
| settings: | ||
| ingestion_source: | ||
| type: file | ||
| mapper_type: field_mapping | ||
| mapper_settings: | ||
| id_field: my_id | ||
| version_field: my_version | ||
| pointer.init.reset: reset_by_offset | ||
| pointer.init.reset.value: 0 | ||
| error_strategy: DROP | ||
| poll.max_batch_size: 10 | ||
| poll.timeout: 100000 | ||
| num_processor_threads: 1 | ||
| internal_queue_size: 100 | ||
| param: | ||
| stream: test-stream | ||
| base_directory: ingestion_directory | ||
| index: | ||
| number_of_shards: 1 | ||
| number_of_replicas: 0 | ||
| replication.type: SEGMENT | ||
| mappings: | ||
| properties: | ||
| name: | ||
| type: text | ||
| response: | ||
| status: 200 | ||
| payload: | ||
| acknowledged: true | ||
| shards_acknowledged: true | ||
| - synopsis: Verify mapper_type and mapper_settings are returned in index settings. | ||
| path: /{index} | ||
| method: GET | ||
| parameters: | ||
| index: test-mapper-index | ||
| response: | ||
| status: 200 | ||
| payload: | ||
| test-mapper-index: | ||
| settings: | ||
| index: | ||
| ingestion_source: | ||
| type: file | ||
| mapper_type: field_mapping | ||
| mapper_settings: | ||
| id_field: my_id | ||
| version_field: my_version |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@imRishN feel free to take a look at https://github.com/opensearch-project/opensearch-api-specification/blob/main/TESTING_GUIDE.md if unit tests can be added for these
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.
Example PBI tests written by @varunbharadwaj https://github.com/opensearch-project/opensearch-api-specification/blob/main/tests/plugins/ingestion-fs/pull_based_ingestion/ingestion.yaml