Skip to content

Commit f294ca5

Browse files
committed
Enable text_embedding function in non-snapshot builds.
1 parent 8028218 commit f294ca5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ public enum Cap {
12431243
/**
12441244
* Support for the {@code TEXT_EMBEDDING} function for generating dense vector embeddings.
12451245
*/
1246-
TEXT_EMBEDDING_FUNCTION(Build.current().isSnapshot()),
1246+
TEXT_EMBEDDING_FUNCTION,
12471247

12481248
/**
12491249
* Support for the LIKE operator with a list of wildcards.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,9 @@ private static FunctionDefinition[][] functions() {
526526
def(AbsentOverTime.class, uni(AbsentOverTime::new), "absent_over_time"),
527527
def(AvgOverTime.class, uni(AvgOverTime::new), "avg_over_time"),
528528
def(LastOverTime.class, uni(LastOverTime::new), "last_over_time"),
529-
def(FirstOverTime.class, uni(FirstOverTime::new), "first_over_time") } };
529+
def(FirstOverTime.class, uni(FirstOverTime::new), "first_over_time"),
530+
// dense vector function
531+
def(TextEmbedding.class, bi(TextEmbedding::new), "text_embedding")}};
530532

531533
}
532534

@@ -545,8 +547,7 @@ private static FunctionDefinition[][] snapshotFunctions() {
545547
def(L1Norm.class, L1Norm::new, "v_l1_norm"),
546548
def(L2Norm.class, L2Norm::new, "v_l2_norm"),
547549
def(Magnitude.class, Magnitude::new, "v_magnitude"),
548-
def(Hamming.class, Hamming::new, "v_hamming"),
549-
def(TextEmbedding.class, bi(TextEmbedding::new), "text_embedding") } };
550+
def(Hamming.class, Hamming::new, "v_hamming")}};
550551
}
551552

552553
public EsqlFunctionRegistry snapshotRegistry() {

0 commit comments

Comments
 (0)