Skip to content

[Search] Default semantic text endpoint select input to ELSER in EIS#242436

Merged
seialkali merged 3 commits intoelastic:mainfrom
seialkali:fix/default-to-elser-2-elastic-endpoint
Nov 13, 2025
Merged

[Search] Default semantic text endpoint select input to ELSER in EIS#242436
seialkali merged 3 commits intoelastic:mainfrom
seialkali:fix/default-to-elser-2-elastic-endpoint

Conversation

@seialkali
Copy link
Contributor

@seialkali seialkali commented Nov 10, 2025

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

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-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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines 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.

@seialkali seialkali requested a review from a team as a code owner November 10, 2025 15:22
@seialkali seialkali added release_note:fix backport:skip This PR does not require backporting Team:Search v9.3.0 ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project labels Nov 10, 2025
@seialkali seialkali force-pushed the fix/default-to-elser-2-elastic-endpoint branch 2 times, most recently from bc903cb to c7c2b99 Compare November 11, 2025 16:12
@seialkali seialkali force-pushed the fix/default-to-elser-2-elastic-endpoint branch from c7c2b99 to 49359a3 Compare November 12, 2025 09:23
- 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
@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 13, 2025

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
indexManagement 704.1KB 704.3KB +221.0B
Unknown metric groups

ESLint disabled in files

id before after diff
indexManagement 2 3 +1

ESLint disabled line counts

id before after diff
indexManagement 15 16 +1

Total ESLint disabled count

id before after diff
indexManagement 17 19 +2

History

Copy link
Member

@efegurkan efegurkan left a comment

Choose a reason for hiding this comment

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

LGTM.

@seialkali seialkali merged commit 4da2c13 into elastic:main Nov 13, 2025
12 checks passed
@seialkali seialkali deleted the fix/default-to-elser-2-elastic-endpoint branch November 13, 2025 13:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project release_note:fix Team:Search v9.3.0

4 participants