5454import static org .elasticsearch .xpack .esql .core .type .DataType .IP ;
5555import static org .elasticsearch .xpack .esql .core .type .DataType .KEYWORD ;
5656import static org .elasticsearch .xpack .esql .core .type .DataType .LONG ;
57- import static org .elasticsearch .xpack .esql .core .type .DataType .OBJECT ;
5857import static org .elasticsearch .xpack .esql .core .type .DataType .UNSIGNED_LONG ;
5958import static org .elasticsearch .xpack .esql .core .type .DataType .VERSION ;
6059import static org .hamcrest .Matchers .containsString ;
@@ -1223,7 +1222,6 @@ public void testFieldBasedFullTextFunctions() throws Exception {
12231222 testFieldBasedFunctionNotAllowedAfterCommands ("MATCH" , "function" , "match(first_name, \" Anna\" )" );
12241223 testFieldBasedFunctionNotAllowedAfterCommands (":" , "operator" , "first_name : \" Anna\" " );
12251224 testFieldBasedFunctionNotAllowedAfterCommands ("MultiMatch" , "function" , "multi_match(\" Anna\" , first_name)" );
1226- testFieldBasedFunctionNotAllowedAfterCommands ("KNN" , "function" , "knn(vector, [1, 2, 3])" );
12271225 }
12281226
12291227 public void testFieldBasedFunctionNotAllowedAfterCommands (String functionName , String functionType , String functionInvocation )
@@ -1351,9 +1349,6 @@ public void testFullTextFunctionsOnlyAllowedInWhere() throws Exception {
13511349 if (EsqlCapabilities .Cap .MULTI_MATCH_FUNCTION .isEnabled ()) {
13521350 checkFullTextFunctionsOnlyAllowedInWhere ("MultiMatch" , "multi_match(\" Anna\" , first_name, last_name)" , "function" );
13531351 }
1354- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
1355- checkFullTextFunctionsOnlyAllowedInWhere ("KNN" , "knn(vector, [1, 2, 3])" , "function" );
1356- }
13571352 }
13581353
13591354 private void checkFullTextFunctionsOnlyAllowedInWhere (String functionName , String functionInvocation , String functionType )
@@ -1437,9 +1432,6 @@ public void testFullTextFunctionsWithNonBooleanFunctions() {
14371432 if (EsqlCapabilities .Cap .MULTI_MATCH_FUNCTION .isEnabled ()) {
14381433 checkFullTextFunctionsWithNonBooleanFunctions ("MultiMatch" , "multi_match(\" Anna\" , first_name, last_name)" , "function" );
14391434 }
1440- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
1441- checkFullTextFunctionsWithNonBooleanFunctions ("KNN" , "knn(vector, [1, 2, 3])" , "function" );
1442- }
14431435 if (EsqlCapabilities .Cap .TERM_FUNCTION .isEnabled ()) {
14441436 checkFullTextFunctionsWithNonBooleanFunctions ("Term" , "term(first_name, \" Anna\" )" , "function" );
14451437 }
@@ -1510,9 +1502,6 @@ public void testFullTextFunctionsTargetsExistingField() throws Exception {
15101502 if (EsqlCapabilities .Cap .TERM_FUNCTION .isEnabled ()) {
15111503 testFullTextFunctionTargetsExistingField ("term(fist_name, \" Anna\" )" );
15121504 }
1513- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
1514- testFullTextFunctionTargetsExistingField ("knn(vector, [0, 1, 2])" );
1515- }
15161505 }
15171506
15181507 private void testFullTextFunctionTargetsExistingField (String functionInvocation ) throws Exception {
@@ -2037,9 +2026,6 @@ public void testFullTextFunctionOptions() {
20372026 if (EsqlCapabilities .Cap .MULTI_MATCH_FUNCTION .isEnabled ()) {
20382027 checkOptionDataTypes (MultiMatch .OPTIONS , "FROM test | WHERE MULTI_MATCH(\" Jean\" , first_name, last_name, {\" %s\" : %s})" );
20392028 }
2040- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
2041- checkOptionDataTypes (Knn .ALLOWED_OPTIONS , "FROM test | WHERE KNN(vector, [0.1, 0.2, 0.3], {\" %s\" : %s})" );
2042- }
20432029 }
20442030
20452031 /**
@@ -2133,10 +2119,6 @@ public void testFullTextFunctionsNullArgs() throws Exception {
21332119 testFullTextFunctionNullArgs ("term(null, \" query\" )" , "first" );
21342120 testFullTextFunctionNullArgs ("term(first_name, null)" , "second" );
21352121 }
2136- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
2137- testFullTextFunctionNullArgs ("knn(null, [0, 1, 2])" , "first" );
2138- testFullTextFunctionNullArgs ("knn(vector, null)" , "second" );
2139- }
21402122 }
21412123
21422124 private void testFullTextFunctionNullArgs (String functionInvocation , String argOrdinal ) throws Exception {
@@ -2156,9 +2138,6 @@ public void testFullTextFunctionsConstantQuery() throws Exception {
21562138 if (EsqlCapabilities .Cap .TERM_FUNCTION .isEnabled ()) {
21572139 testFullTextFunctionsConstantQuery ("term(first_name, last_name)" , "second" );
21582140 }
2159- if (EsqlCapabilities .Cap .KNN_FUNCTION .isEnabled ()) {
2160- testFullTextFunctionsConstantQuery ("knn(vector, vector)" , "second" );
2161- }
21622141 }
21632142
21642143 private void testFullTextFunctionsConstantQuery (String functionInvocation , String argOrdinal ) throws Exception {
0 commit comments