mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 09:54:06 -04:00
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.
29 lines
533 B
Text
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]
|
|
|===
|