ES|QL ENDS_WITH function
str- String expression. If
null, the function returnsnull. suffix-
String expression. If
null, the function returnsnull.
Returns a boolean that indicates whether a keyword string ends with another string.
| str | suffix | result |
|---|---|---|
| keyword | keyword | boolean |
| keyword | text | boolean |
| text | keyword | boolean |
| text | text | boolean |
FROM employees
| KEEP last_name
| EVAL ln_E = ENDS_WITH(last_name, "d")
| last_name:keyword | ln_E:boolean |
|---|---|
| Awdeh | false |
| Azuma | false |
| Baek | false |
| Bamford | true |
| Bernatsky | false |