elasticsearch/docs/reference/esql/functions/to_string.asciidoc
Nik Everett 64e41ef100 Add mv_join function (ESQL-1166)
Adds an `mv_join` function that joins together multivalue string fields.
You can combine this with out fancy new `to_string` to join together any
multivalued fields into a string.
2023-05-25 02:32:23 +10:00

29 lines
533 B
Text

[[esql-to_string]]
=== `TO_STRING`
Converts a field into a string. For example:
[source,esql]
----
include::{esql-specs}/ints.csv-spec[tag=to_string]
----
which returns:
[%header,format=dsv,separator=|]
|===
include::{esql-specs}/ints.csv-spec[tag=to_string-result]
|===
It also works fine on multivalued fields:
[source,esql]
----
include::{esql-specs}/ints.csv-spec[tag=to_string_multivalue]
----
which returns:
[%header,format=dsv,separator=|]
|===
include::{esql-specs}/ints.csv-spec[tag=to_string_multivalue-result]
|===