[Search] Default semantic text endpoint select input to ELSER in EIS#242436
Merged
seialkali merged 3 commits intoelastic:mainfrom Nov 13, 2025
Merged
Conversation
bc903cb to
c7c2b99
Compare
c7c2b99 to
49359a3
Compare
- SelectInferenceId: restrict to compatible task types, prioritize .elser-2-elastic, close popover deterministically, keep optimistic selection - CreateField: only refocus type input after real submit - tests: modern fake timers and focused spies covering default selection, popover, optimistic endpoint, and focus logic
kapral18
approved these changes
Nov 13, 2025
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
|
eokoneyo
pushed a commit
to eokoneyo/kibana
that referenced
this pull request
Dec 2, 2025
…lastic#242436) ## Summary This PR sets `.elser-2-elastic` (ELSER in EIS) as the selected default inference endpoint when adding semantic text field mappings. In addition, this PR also refactors parts of the `SelectInferenceId` component to improve clarity, reduce the potential for bugs, and fixes a console error. The following updates were made: - Minor naming and structure cleanups to improve readability. - Refactored `options` so that it focused purely on setting the options array for `EuiSelectable`. The default endpoint is now determined in a helper function `getDefaultInferenceId`, and the default `value` state is updated in a `useEffect`. These changes fixed the following console error: `Warning: Cannot update a component (UseFieldComp) while rendering a different component (SelectInferenceIdContent)` A separate commit was also made by Karen, to fix a bug where clicking anywhere on the page after the semantic text field was selected would retrigger the dropdown. ### Video https://github.com/user-attachments/assets/f55ce940-037a-4a19-9c34-2bad449a6bc4 ## Testing **Note**: This PR currently can't be tested locally as the EIS script isn't set up to show the `.elser-2-elastic` endpoint, so you will need to use the CI cloud/serverless deployment in this PR 1. Create an index with a mapping that has a field of type `semantic_text`. Easiest way to do this with semantic search console tutorial on the home page. 2. Go to index management and click on the index you created 3. Click on the `Mappings` tab 4. Confirm that the field mapping you created uses the `.elser-2-elastic` inference endpoint (it should show as a tag on the field mapping) 5. Add a new field with a `semantic_text` type, and confirm that the `.elser-2-elastic` inference endpoint is automatically selected by default 6. Click anywhere outside the dropdown field to confirm that the dropdown is no longer retriggered 7. Save the new mapping and confirm that the field has been created using the `.elser-2-elastic` inference endpoint ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~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/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [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 - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [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) - [ ] ~Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.~ ## Release note .`elser-2-elastic` (ELSER in EIS) is now automatically selected as the default inference endpoint when adding semantic text fields. The `SelectInferenceId` component has been refactored for clarity and stability, resolving a console warning and improving popover and flyout state handling. --------- Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
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
This PR sets
.elser-2-elastic(ELSER in EIS) as the selected default inference endpoint when adding semantic text field mappings.In addition, this PR also refactors parts of the
SelectInferenceIdcomponent to improve clarity, reduce the potential for bugs, and fixes a console error. The following updates were made:optionsso that it focused purely on setting the options array forEuiSelectable. The default endpoint is now determined in a helper functiongetDefaultInferenceId, and the defaultvaluestate is updated in auseEffect. These changes fixed the following console error:Warning: Cannot update a component (UseFieldComp) while rendering a different component (SelectInferenceIdContent)A separate commit was also made by Karen, to fix a bug where clicking anywhere on the page after the semantic text field was selected would retrigger the dropdown.
Video
elser.on.eis.-.semantic.text.mov
Testing
Note: This PR currently can't be tested locally as the EIS script isn't set up to show the
.elser-2-elasticendpoint, so you will need to use the CI cloud/serverless deployment in this PRsemantic_text. Easiest way to do this with semantic search console tutorial on the home page.Mappingstab.elser-2-elasticinference endpoint (it should show as a tag on the field mapping)semantic_texttype, and confirm that the.elser-2-elasticinference endpoint is automatically selected by default.elser-2-elasticinference endpointChecklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsIf a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listThis was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. Therelease_note:breakinglabel should be applied in these situations.Flaky Test Runner was used on any tests changedrelease_note:*label is applied per the guidelinesReview the backport guidelines and apply applicablebackport:*labels.Release note
.
elser-2-elastic(ELSER in EIS) is now automatically selected as the default inference endpoint when adding semantic text fields. TheSelectInferenceIdcomponent has been refactored for clarity and stability, resolving a console warning and improving popover and flyout state handling.