Skip to content

[ES|QL] Enable the TEXT_EMBEDDING function in non-snapshot build - #136103

Merged
afoucret merged 18 commits into
elastic:mainfrom
afoucret:esql-text-embedding-function-out-of-snapshot
Oct 8, 2025
Merged

afoucret merged 18 commits into
elastic:mainfrom
afoucret:esql-text-embedding-function-out-of-snapshot

Conversation

@afoucret

@afoucret afoucret commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@afoucret afoucret added >feature :Search Relevance/ES|QL Search functionality in ES|QL v9.3.0 labels Oct 7, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 7, 2025
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @afoucret, I've created a changelog YAML for you.

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@afoucret
afoucret force-pushed the esql-text-embedding-function-out-of-snapshot branch from bb7f79d to dc8bb16 Compare October 7, 2025 16:14
@afoucret afoucret added the test-release Trigger CI checks against release build label Oct 7, 2025
@afoucret
afoucret force-pushed the esql-text-embedding-function-out-of-snapshot branch from dc8bb16 to 3b4fa1e Compare October 7, 2025 16:55
@afoucret
afoucret force-pushed the esql-text-embedding-function-out-of-snapshot branch from 3b4fa1e to e958a11 Compare October 7, 2025 16:55
@github-actions

github-actions Bot commented Oct 7, 2025 •

Copy link
Copy Markdown
Contributor

@afoucret
afoucret requested a review from Copilot October 7, 2025 19:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enables the TEXT_EMBEDDING function in non-snapshot builds of Elasticsearch, moving it from development-only to general preview availability. The function generates dense vector embeddings from text using inference endpoints.

Key changes:

  • Moved TEXT_EMBEDDING function from snapshot-only to general availability
  • Updated function registration and capability flags
  • Removed capability checks from tests and made function always available
  • Enhanced documentation with additional examples and clearer descriptions

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
EsqlCapabilities.java Removed snapshot-only restriction from TEXT_EMBEDDING_FUNCTION capability
EsqlFunctionRegistry.java Moved TEXT_EMBEDDING function from snapshot functions to general functions
TextEmbedding.java Updated function metadata and lifecycle from DEVELOPMENT to PREVIEW
Multiple test files Removed capability checks that were gating TEXT_EMBEDDING function tests
Documentation files Updated function descriptions and added new usage examples
60_usage.yml Added TEXT_EMBEDDING function usage tracking in REST API tests
text-embedding.csv-spec Updated example tags for consistency
changelog/136103.yaml Added changelog entry for the feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


@Override
public void writeTo(StreamOutput out) throws IOException {
public void writeTo(StreamOutput out) {

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

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

The method signature was changed to remove the throws IOException declaration, but StreamOutput.write* methods can throw IOException. This could cause compilation errors if the method implementation actually tries to write to the stream.

Suggested change
public void writeTo(StreamOutput out) {
public void writeTo(StreamOutput out) throws java.io.IOException {

Copilot uses AI. Check for mistakes.

@carlosdelest carlosdelest left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@leemthompo leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great already :)

@leemthompo leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM once regenerate the docs :) Thanks @afoucret!

I noticed one unrelated change that should also be fixed in parameters:

- Text to generate embeddings from
+ Text string to generate embeddings from.

@afoucret

afoucret commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

@leemthompo Applied most of your suggestions.
Also I updated the example description if you can have a look.

@afoucret
afoucret enabled auto-merge (squash) October 8, 2025 10:25
@afoucret
afoucret merged commit e487634 into elastic:main Oct 8, 2025
31 checks passed
@afoucret afoucret mentioned this pull request Oct 8, 2025
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature :Search Relevance/ES|QL Search functionality in ES|QL Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch test-release Trigger CI checks against release build v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants