[Search] Fix: Only run ML saved object check if saving semantic text mapping#248462
Merged
seialkali merged 1 commit intoelastic:mainfrom Jan 9, 2026
Merged
Conversation
SoniaSanzV
approved these changes
Jan 9, 2026
Contributor
SoniaSanzV
left a comment
There was a problem hiding this comment.
tested locally, lgtm! Thank you for the thorough PR descrption.
Contributor
|
Starting backport for target branches: 9.1, 9.2, 9.3 |
Contributor
💚 Build Succeeded
Metrics [docs]
|
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 9, 2026
…mapping (elastic#248462) ## Summary When running Elasticsearch with a Basic license, attempting to update index mappings could fail even when adding non-ML field types. This happened because, during mapping updates, we unconditionally made a synchronous call to fetch the latest ML data from Saved Objects. That call requires a Platinum license and therefore fails under a Basic license. This change guards the sync call behind explicit checks for both ML and semantic text permissions (which require a Platinum license), and only executes it when a semantic_text field is being saved. This prevents mapping updates from failing on lower license tiers while preserving the existing behavior for semantic text fields. ## Testing To test this PR you will need to confirm that you can save mappings with both a basic and trial license. You will also need to run EIS locally with a trial license: ### Basic license 1. Run Elasticsearch with a basic license: `yarn es snapshot` 2. Create an index 3. Confirm you can add a field and successfully save the mapping ### Trial license 1. Run Elasticsearch with a trial license: `yarn es snapshot --license trial` 2. Run EIS locally. You can find the instructions in the [EIS script README](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md). 3. Create an index 3. Confirm you can add a `semantic_text` field and successfully save the mapping ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes an issue when running Elasticsearch with a Basic license, where users might encounter errors when updating index mappings, even when adding non-ML field types. This issue has been resolved so that mapping updates now work as expected, while advanced semantic text features continue to require the appropriate license. (cherry picked from commit 77bd7f9)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 9, 2026
…mapping (elastic#248462) ## Summary When running Elasticsearch with a Basic license, attempting to update index mappings could fail even when adding non-ML field types. This happened because, during mapping updates, we unconditionally made a synchronous call to fetch the latest ML data from Saved Objects. That call requires a Platinum license and therefore fails under a Basic license. This change guards the sync call behind explicit checks for both ML and semantic text permissions (which require a Platinum license), and only executes it when a semantic_text field is being saved. This prevents mapping updates from failing on lower license tiers while preserving the existing behavior for semantic text fields. ## Testing To test this PR you will need to confirm that you can save mappings with both a basic and trial license. You will also need to run EIS locally with a trial license: ### Basic license 1. Run Elasticsearch with a basic license: `yarn es snapshot` 2. Create an index 3. Confirm you can add a field and successfully save the mapping ### Trial license 1. Run Elasticsearch with a trial license: `yarn es snapshot --license trial` 2. Run EIS locally. You can find the instructions in the [EIS script README](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md). 3. Create an index 3. Confirm you can add a `semantic_text` field and successfully save the mapping ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes an issue when running Elasticsearch with a Basic license, where users might encounter errors when updating index mappings, even when adding non-ML field types. This issue has been resolved so that mapping updates now work as expected, while advanced semantic text features continue to require the appropriate license. (cherry picked from commit 77bd7f9)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 9, 2026
…mapping (elastic#248462) ## Summary When running Elasticsearch with a Basic license, attempting to update index mappings could fail even when adding non-ML field types. This happened because, during mapping updates, we unconditionally made a synchronous call to fetch the latest ML data from Saved Objects. That call requires a Platinum license and therefore fails under a Basic license. This change guards the sync call behind explicit checks for both ML and semantic text permissions (which require a Platinum license), and only executes it when a semantic_text field is being saved. This prevents mapping updates from failing on lower license tiers while preserving the existing behavior for semantic text fields. ## Testing To test this PR you will need to confirm that you can save mappings with both a basic and trial license. You will also need to run EIS locally with a trial license: ### Basic license 1. Run Elasticsearch with a basic license: `yarn es snapshot` 2. Create an index 3. Confirm you can add a field and successfully save the mapping ### Trial license 1. Run Elasticsearch with a trial license: `yarn es snapshot --license trial` 2. Run EIS locally. You can find the instructions in the [EIS script README](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md). 3. Create an index 3. Confirm you can add a `semantic_text` field and successfully save the mapping ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes an issue when running Elasticsearch with a Basic license, where users might encounter errors when updating index mappings, even when adding non-ML field types. This issue has been resolved so that mapping updates now work as expected, while advanced semantic text features continue to require the appropriate license. (cherry picked from commit 77bd7f9)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jan 9, 2026
… text mapping (#248462) (#248502) # Backport This will backport the following commits from `main` to `9.3`: - [[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)](#248462) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-01-09T17:11:22Z","message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.3.0","v9.4.0","v9.2.4","v9.1.10"],"title":"[Search] Fix: Only run ML saved object check if saving semantic text mapping","number":248462,"url":"https://github.com/elastic/kibana/pull/248462","mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2","9.1"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248462","number":248462,"mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Jan 9, 2026
… text mapping (#248462) (#248499) # Backport This will backport the following commits from `main` to `9.1`: - [[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)](#248462) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-01-09T17:11:22Z","message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.3.0","v9.4.0","v9.2.4","v9.1.10"],"title":"[Search] Fix: Only run ML saved object check if saving semantic text mapping","number":248462,"url":"https://github.com/elastic/kibana/pull/248462","mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2","9.1"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248462","number":248462,"mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Jan 9, 2026
… text mapping (#248462) (#248501) # Backport This will backport the following commits from `main` to `9.2`: - [[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)](#248462) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2026-01-09T17:11:22Z","message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.3.0","v9.4.0","v9.2.4","v9.1.10"],"title":"[Search] Fix: Only run ML saved object check if saving semantic text mapping","number":248462,"url":"https://github.com/elastic/kibana/pull/248462","mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2","9.1"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/248462","number":248462,"mergeCommit":{"message":"[Search] Fix: Only run ML saved object check if saving semantic text mapping (#248462)\n\n## Summary\n\nWhen running Elasticsearch with a Basic license, attempting to update\nindex mappings could fail even when adding non-ML field types. This\nhappened because, during mapping updates, we unconditionally made a\nsynchronous call to fetch the latest ML data from Saved Objects. That\ncall requires a Platinum license and therefore fails under a Basic\nlicense.\n\nThis change guards the sync call behind explicit checks for both ML and\nsemantic text permissions (which require a Platinum license), and only\nexecutes it when a semantic_text field is being saved. This prevents\nmapping updates from failing on lower license tiers while preserving the\nexisting behavior for semantic text fields.\n\n## Testing\n\nTo test this PR you will need to confirm that you can save mappings with\nboth a basic and trial license. You will also need to run EIS locally\nwith a trial license:\n\n### Basic license\n1. Run Elasticsearch with a basic license: `yarn es snapshot`\n2. Create an index\n3. Confirm you can add a field and successfully save the mapping\n\n### Trial license\n1. Run Elasticsearch with a trial license: `yarn es snapshot --license\ntrial`\n2. Run EIS locally. You can find the instructions in the [EIS script\nREADME](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md).\n3. Create an index\n3. Confirm you can add a `semantic_text` field and successfully save the\nmapping\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\nFixes an issue when running Elasticsearch with a Basic license, where\nusers might encounter errors when updating index mappings, even when\nadding non-ML field types. This issue has been resolved so that mapping\nupdates now work as expected, while advanced semantic text features\ncontinue to require the appropriate license.","sha":"77bd7f9e12f49628077aad74a252dd090b05590e"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.10","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
devamanv
pushed a commit
to devamanv/kibana
that referenced
this pull request
Jan 12, 2026
…mapping (elastic#248462) ## Summary When running Elasticsearch with a Basic license, attempting to update index mappings could fail even when adding non-ML field types. This happened because, during mapping updates, we unconditionally made a synchronous call to fetch the latest ML data from Saved Objects. That call requires a Platinum license and therefore fails under a Basic license. This change guards the sync call behind explicit checks for both ML and semantic text permissions (which require a Platinum license), and only executes it when a semantic_text field is being saved. This prevents mapping updates from failing on lower license tiers while preserving the existing behavior for semantic text fields. ## Testing To test this PR you will need to confirm that you can save mappings with both a basic and trial license. You will also need to run EIS locally with a trial license: ### Basic license 1. Run Elasticsearch with a basic license: `yarn es snapshot` 2. Create an index 3. Confirm you can add a field and successfully save the mapping ### Trial license 1. Run Elasticsearch with a trial license: `yarn es snapshot --license trial` 2. Run EIS locally. You can find the instructions in the [EIS script README](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-inference-cli/README.md). 3. Create an index 3. Confirm you can add a `semantic_text` field and successfully save the mapping ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes an issue when running Elasticsearch with a Basic license, where users might encounter errors when updating index mappings, even when adding non-ML field types. This issue has been resolved so that mapping updates now work as expected, while advanced semantic text features continue to require the appropriate license.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When running Elasticsearch with a Basic license, attempting to update index mappings could fail even when adding non-ML field types. This happened because, during mapping updates, we unconditionally made a synchronous call to fetch the latest ML data from Saved Objects. That call requires a Platinum license and therefore fails under a Basic license.
This change guards the sync call behind explicit checks for both ML and semantic text permissions (which require a Platinum license), and only executes it when a semantic_text field is being saved. This prevents mapping updates from failing on lower license tiers while preserving the existing behavior for semantic text fields.
Testing
To test this PR you will need to confirm that you can save mappings with both a basic and trial license. You will also need to run EIS locally with a trial license:
Basic license
yarn es snapshotTrial license
yarn es snapshot --license trialsemantic_textfield and successfully save the mappingChecklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*label is applied per the guidelinesbackport:*labels.Release note
Fixes an issue when running Elasticsearch with a Basic license, where users might encounter errors when updating index mappings, even when adding non-ML field types. This issue has been resolved so that mapping updates now work as expected, while advanced semantic text features continue to require the appropriate license.