Skip to content

Commit c7ba8db

Browse files
committed
Move from textExpansion to sparseVector query
1 parent 1594c52 commit c7ba8db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/fr/pilato/test/elasticsearch/hlclient/EsClientIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,13 +832,13 @@ void elser() throws IOException {
832832
// Search
833833
client.search(sr -> sr
834834
.index(indexName)
835-
.query(q -> q.textExpansion(te -> te
835+
.query(q -> q.sparseVector(sv -> sv
836836
.field("content_embedding")
837-
.modelId(".elser_model_2")
838-
.modelText("How to avoid muscle soreness after running?")
837+
.inferenceId("elser-v2-test")
838+
.query("How to avoid muscle soreness after running?")
839839
)), ObjectNode.class);
840840
});
841-
assertEquals("[.elser_model_2] is not an inference service model or a deployed ml model", exception.error().reason());
841+
assertEquals("[elser-v2-test] is not an inference service model or a deployed ml model", exception.error().reason());
842842
assertEquals(404, exception.status());
843843
}
844844

0 commit comments

Comments
 (0)