Skip to content

Commit 2c4f4bb

Browse files
authored
ESQL - full text functions verifier tests refactor (#128775) (#128838)
(cherry picked from commit dc3d515) # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MultiMatch.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java
1 parent 01d99d8 commit 2c4f4bb

File tree

3 files changed

+285
-455
lines changed

3 files changed

+285
-455
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"properties": {
3+
"id": {
4+
"type": "integer"
5+
},
6+
"title": {
7+
"type": "text"
8+
},
9+
"body": {
10+
"type": "text"
11+
},
12+
"tags": {
13+
"type": "keyword"
14+
},
15+
"category": {
16+
"type": "integer"
17+
},
18+
"published_date": {
19+
"type": "date"
20+
},
21+
"vector": {
22+
"type": "dense_vector",
23+
"similarity": "l2_norm"
24+
}
25+
}
26+
}

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,7 @@ private static void checkFullTextQueryFunctions(LogicalPlan plan, Failures failu
195195
checkCommandsBeforeExpression(
196196
plan,
197197
condition,
198-
Match.class,
199-
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
200-
m -> "[" + m.functionName() + "] " + m.functionType(),
201-
failures
202-
);
203-
checkCommandsBeforeExpression(
204-
plan,
205-
condition,
206-
Term.class,
198+
FullTextFunction.class,
207199
lp -> (lp instanceof Limit == false) && (lp instanceof Aggregate == false),
208200
m -> "[" + m.functionName() + "] " + m.functionType(),
209201
failures

0 commit comments

Comments
 (0)