Skip to content

[ES|QL] Compare query builders using identity#139080

Merged
Mikep86 merged 5 commits intoelastic:mainfrom
Mikep86:esql_fix-query-rewrite-bug
Dec 5, 2025
Merged

[ES|QL] Compare query builders using identity#139080
Mikep86 merged 5 commits intoelastic:mainfrom
Mikep86:esql_fix-query-rewrite-bug

Conversation

@Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Dec 4, 2025

Updates the full-text functions to compare query builders using identity. This aligns the query builder comparison behavior with Query DSL and Retrievers. It also prevents infinite rewrites on queries that rewrite in ways that preserve equality while generating new instances.

@Mikep86 Mikep86 requested review from a team, ioanatia and kderusso December 4, 2025 18:02
@Mikep86 Mikep86 added >bug auto-backport Automatically create backport pull requests when merged :SearchOrg/Relevance Label for the Search (solution/org) Relevance team branch:9.2 branch:9.1 branch:8.19 labels Dec 4, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

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

LGTM, nice find

@Mikep86 Mikep86 merged commit afa1ea9 into elastic:main Dec 5, 2025
34 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts
9.2

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 139080

Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Dec 5, 2025
Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Dec 5, 2025
(cherry picked from commit afa1ea9)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/SingleFieldFullTextFunction.java
Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Dec 5, 2025
(cherry picked from commit afa1ea9)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/SingleFieldFullTextFunction.java
@Mikep86
Copy link
Contributor Author

Mikep86 commented Dec 5, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19

Questions ?

Please refer to the Backport tool documentation

elasticsearchmachine pushed a commit that referenced this pull request Dec 5, 2025
(cherry picked from commit afa1ea9)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/SingleFieldFullTextFunction.java
elasticsearchmachine pushed a commit that referenced this pull request Dec 5, 2025
(cherry picked from commit afa1ea9)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/SingleFieldFullTextFunction.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team v8.19.9 v9.1.9 v9.2.3 v9.3.0

3 participants