Skip to content

Commit 1e54c34

Browse files
Fix order of args
1 parent 970cbea commit 1e54c34

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchOperator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ protected NodeInfo<? extends Expression> info() {
7878

7979
@Override
8080
public Expression replaceChildren(List<Expression> newChildren) {
81-
return new MatchOperator(source(), newChildren.get(0), newChildren.get(1), queryBuilder());
81+
// Query first, then field.
82+
return new MatchOperator(source(), newChildren.get(1), newChildren.get(0), queryBuilder());
8283
}
8384

8485
@Override

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@ public void testFunctionNamedParamsAsFunctionArgument1() {
28622862
public void testFunctionNamedParamsAsFunctionArgument2() {
28632863
LogicalPlan plan = analyze("""
28642864
from test
2865-
| WHERE MULTI_MATCH(first_name, last_name, "Anna Smith", {"minimum_should_match": 3.0})
2865+
| WHERE MATCH(first_name, last_name, "Anna Smith", {"minimum_should_match": 3.0})
28662866
""");
28672867
Limit limit = as(plan, Limit.class);
28682868
Filter filter = as(limit.child(), Filter.class);

0 commit comments

Comments
 (0)