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

[8.x] [Mappings Editor] Add support for synthetic _source (#199854) #200776

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Closes elastic#198621

## Summary

This PR adds support for the synthetic _source field in the mappings
Advanced options.

Stored option:
<img width="1184" alt="Screenshot 2024-11-14 at 19 19 19"
src="https://github.com/user-attachments/assets/086f7a3e-9ca1-42de-9f9c-d3599d839ccf">

Synthetic option selected:
<img width="1184" alt="Screenshot 2024-11-14 at 19 19 27"
src="https://github.com/user-attachments/assets/3700bced-212a-4378-b51a-ab7a0f4f7b99">

Disabled option selected:
<img width="1184" alt="Screenshot 2024-11-14 at 19 19 36"
src="https://github.com/user-attachments/assets/c7ddcbae-7c78-4477-824e-99b144a1f750">

https://github.com/user-attachments/assets/399d0f95-a5dd-4874-bb8c-e95d6ed38465

How to test:
1. Start Es with `yarn es snapshot --license` (we need Enterprise
license to see the Synthetic source option) and Kibana with `yarn start`
2. Go to Index templates/Component templates and start creating a
template
3. At the Mappings step, go to Advanced options.
4. Verify that selecting a _source field option translates to the
correct Es request.
5. In Index templates form, verify that the default _source option
depends on the index mode selected in the Logistics step. For LogsDB and
Time series index mode, the default should be synthetic mode; otherwise,
the stored option.
6. Verify that in Basic license, the synthetic option is not displayed.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 8be679a)
@kibanamachine kibanamachine merged commit 12031fa into elastic:8.x Nov 19, 2024
25 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 697 699 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiAssistantManagementSelection 92.6KB 92.7KB +78.0B
indexManagement 693.6KB 697.0KB +3.4KB
lists 145.1KB 145.1KB +78.0B
total +3.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 453.9KB 453.9KB +78.0B

cc @ElenaStoeva

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

Successfully merging this pull request may close these issues.

3 participants