Skip to content

Commit 8c93015

Browse files
committed
Apply new RERANK/COMPLETION syntax
1 parent 933f484 commit 8c93015

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/inference/InferenceResolverTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ public void shutdownThreadPool() {
6868
public void testCollectInferenceIds() {
6969
// Rerank inference plan
7070
assertCollectInferenceIds(
71-
"FROM books METADATA _score | RERANK \"italian food recipe\" ON title WITH inferenceId=`rerank-inference-id`",
71+
"FROM books METADATA _score | RERANK \"italian food recipe\" ON title WITH { \"inference_id\": \"rerank-inference-id\" }",
7272
List.of("rerank-inference-id")
7373
);
7474

7575
// Completion inference plan
7676
assertCollectInferenceIds(
77-
"FROM books METADATA _score | COMPLETION \"italian food recipe\" WITH `completion-inference-id`",
77+
"FROM books METADATA _score | COMPLETION \"italian food recipe\" WITH { \"inference_id\": \"completion-inference-id\" }",
7878
List.of("completion-inference-id")
7979
);
8080

8181
// Multiple inference plans
8282
assertCollectInferenceIds("""
8383
FROM books METADATA _score
84-
| RERANK \"italian food recipe\" ON title WITH inferenceId=`rerank-inference-id`
85-
| COMPLETION \"italian food recipe\" WITH `completion-inference-id`
84+
| RERANK "italian food recipe" ON title WITH { "inference_id": "rerank-inference-id" }
85+
| COMPLETION "italian food recipe" WITH { "inference_id": "completion-inference-id" }
8686
""", List.of("rerank-inference-id", "completion-inference-id"));
8787

8888
// No inference operations

0 commit comments

Comments
 (0)