ES|QL RIGHT function
string- The string from which to returns a substring.
length-
The number of characters to return.
Return the substring that extracts length chars from str starting from the right.
| string | length | result |
|---|---|---|
| keyword | integer | keyword |
| text | integer | keyword |
FROM employees
| KEEP last_name
| EVAL right = RIGHT(last_name, 3)
| last_name:keyword | right:keyword |
|---|---|
| Awdeh | deh |
| Azuma | uma |
| Baek | aek |
| Bamford | ord |
| Bernatsky | sky |