elasticsearch/docs/reference/esql/functions/to_string.asciidoc

32 lines
556 B
Plaintext

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