@@ -1213,7 +1213,9 @@ public void testWeightedAvg() {
12131213
12141214 public void testMatchInsideEval () throws Exception {
12151215 assertEquals (
1216- "1:36: [:] operator is only supported in WHERE and STATS commands, or in EVAL within score(.) function\n "
1216+ "1:36: [:] operator is only supported in WHERE and STATS commands"
1217+ + (EsqlCapabilities .Cap .SCORE_FUNCTION .isEnabled () ? ", or in EVAL within score(.) function" : "" )
1218+ + "\n "
12171219 + "line 1:36: [:] operator cannot operate on [title], which is not a field from an index mapping" ,
12181220 error ("row title = \" brown fox\" | eval x = title:\" fox\" " )
12191221 );
@@ -1385,7 +1387,8 @@ private void checkFullTextFunctionsOnlyAllowedInWhere(String functionName, Strin
13851387 + functionName
13861388 + "] "
13871389 + functionType
1388- + " is only supported in WHERE and STATS commands, or in EVAL within score(.) function"
1390+ + " is only supported in WHERE and STATS commands"
1391+ + (EsqlCapabilities .Cap .SCORE_FUNCTION .isEnabled () ? ", or in EVAL within score(.) function" : "" )
13891392 )
13901393 );
13911394 assertThat (
@@ -1400,7 +1403,14 @@ private void checkFullTextFunctionsOnlyAllowedInWhere(String functionName, Strin
14001403 if ("KQL" .equals (functionName ) || "QSTR" .equals (functionName )) {
14011404 assertThat (
14021405 error ("row a = " + functionInvocation , fullTextAnalyzer ),
1403- containsString ("[" + functionName + "] " + functionType + " is only supported in WHERE and STATS commands" )
1406+ containsString (
1407+ "["
1408+ + functionName
1409+ + "] "
1410+ + functionType
1411+ + " is only supported in WHERE and STATS commands"
1412+ + (EsqlCapabilities .Cap .SCORE_FUNCTION .isEnabled () ? ", or in EVAL within score(.) function" : "" )
1413+ )
14041414 );
14051415 }
14061416 }
0 commit comments