mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 23:57:20 -04:00
Annotations for math functions, datetime functions, string functions, type conversion functions.
34 lines
1.1 KiB
Text
Generated
34 lines
1.1 KiB
Text
Generated
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
|
|
*Examples*
|
|
|
|
This example returns the first three characters of every last name:
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/docs.csv-spec[tag=substring]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/docs.csv-spec[tag=substring-result]
|
|
|===
|
|
A negative start position is interpreted as being relative to the end of the string.
|
|
This example returns the last three characters of of every last name:
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/docs.csv-spec[tag=substringEnd]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/docs.csv-spec[tag=substringEnd-result]
|
|
|===
|
|
If length is omitted, substring returns the remainder of the string.
|
|
This example returns all characters except for the first:
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/docs.csv-spec[tag=substringRemainder]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/docs.csv-spec[tag=substringRemainder-result]
|
|
|===
|
|
|