ES|QL string functions
ES|QL supports these string functions:
BIT_LENGTHReturns the bit length of a string.
BYTE_LENGTHReturns the byte length of a string.
CHUNKSplits a text field into smaller chunks.
CONCATConcatenates two or more strings.
CONTAINSChecks whether a keyword substring is contained within another string.
ENDS_WITHChecks whether a keyword string ends with another string.
FROM_BASE64Decodes a base64 string.
HASHComputes the hash of the input using a specified algorithm.
JSON_EXTRACTExtracts a value from a JSON string using JSONPath syntax.
LEFTReturns a substring of the specified length from the left side of a string.
LENGTHReturns the character length of a string.
LOCATEReturns the position of a keyword substring within another string.
LTRIMRemoves leading whitespaces from a string.
MD5Computes the MD5 hash of the input.
REPEATReturns a string repeated a specified number of times.
REPLACEReplaces regular expression matches in a string with a replacement string.
REVERSEReturns the input string in reverse order.
RIGHTReturns a substring of the specified length from the right side of a string.
RTRIMRemoves trailing whitespaces from a string.
SHA1Computes the SHA1 hash of the input.
SHA256Computes the SHA256 hash of the input.
SPACEReturns a string made of the specified number of spaces.
SPLITSplits a single valued string into multiple strings.
STARTS_WITHChecks whether a keyword string starts with another string.
SUBSTRINGReturns a substring of a string, specified by a start position and an optional length.
TO_BASE64Encodes a string to a base64 string.
TO_LOWERReturns a new string converted to lower case.
TO_UPPERReturns a new string converted to upper case.
TRIMRemoves leading and trailing whitespaces from a string.
URL_DECODEDecodes a URL-encoded string.
URL_ENCODEURL-encodes a string with spaces encoded as plus signs.
URL_ENCODE_COMPONENTURL-encodes a string with spaces encoded as percent codes.