Loading

ES|QL STARTS_WITH function

Embedded
str
String expression. If null, the function returns null.
prefix

String expression. If null, the function returns null.

Returns a boolean that indicates whether a keyword string starts with another string.

str prefix result
keyword keyword boolean
keyword text boolean
text keyword boolean
text text boolean
FROM employees
| KEEP last_name
| EVAL ln_S = STARTS_WITH(last_name, "B")
		
last_name:keyword ln_S:boolean
Awdeh false
Azuma false
Baek true
Bamford true
Bernatsky true