Skip to content

Conversation

carlosdelest
Copy link
Member

@carlosdelest carlosdelest commented Jan 17, 2025

Adds options to match function.

#118619 added named function parameters. This PR uses this mechanism for allowing match function parameters, so match query parameters can be used in ES|QL.

This allows using fuzziness and boosting in score, which are interesting use cases for ES|QL.

fang-xing-esql and others added 30 commits December 12, 2024 16:04
@carlosdelest
Copy link
Member Author

@elasticmachine run elasticsearch-ci/part-1

@carlosdelest
Copy link
Member Author

@elasticmachine run elasticsearch-ci/part-4

@carlosdelest carlosdelest disabled auto-merge January 25, 2025 15:01
@carlosdelest
Copy link
Member Author

I needed to make a serialization change for this to work - 9da584c.

#120504 created a code structure where MatchOperator was being serialized, and serialized incorrectly (as it was not including the QueryBuilder). This caused serialization incompatibility in BwC tests.

I opted for not serializing MatchOperator - it's now a class that is used for convenience in verification (as it is the one that contains details needed for the error messages), but is serialized using Match.

I'm happy to discuss this change - I'll wait to EOD to merge this PR to see if there's any concern about it.

@carlosdelest carlosdelest enabled auto-merge (squash) January 28, 2025 06:41
@carlosdelest carlosdelest merged commit d91d516 into elastic:main Jan 28, 2025
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

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

carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Jan 28, 2025
(cherry picked from commit d91d516)

# Conflicts:
#	docs/reference/esql/functions/description/match.asciidoc
#	docs/reference/esql/functions/kibana/definition/match.json
#	docs/reference/esql/functions/kibana/docs/match.md
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
@carlosdelest
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

elasticsearchmachine pushed a commit that referenced this pull request Jan 28, 2025
(cherry picked from commit d91d516)

# Conflicts:
#	docs/reference/esql/functions/description/match.asciidoc
#	docs/reference/esql/functions/kibana/definition/match.json
#	docs/reference/esql/functions/kibana/docs/match.md
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
carlosdelest added a commit to carlosdelest/elasticsearch that referenced this pull request Mar 11, 2025
(cherry picked from commit d91d516)

# Conflicts:
#	docs/reference/esql/functions/description/match.asciidoc
#	docs/reference/esql/functions/kibana/definition/match.json
#	docs/reference/esql/functions/kibana/docs/match.md
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending >feature Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants