Loading

ES|QL CONTAINS function

Embedded
string
String expression: input string to check against. If null, the function returns null.
substring

String expression: A substring to find in the input string. If null, the function returns null.

Returns a boolean that indicates whether a keyword substring is within another string. Returns null if either parameter is null.

string substring result
keyword keyword boolean
keyword text boolean
text keyword boolean
text text boolean
ROW a = "hello"
| EVAL has_ll = CONTAINS(a, "ll")
		
a:keyword has_ll:boolean
hello true