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

31 lines
627 B
Plaintext
Raw Normal View History

[[esql-mv_concat]]
=== `MV_CONCAT`
Converts a multivalued string field into a single valued field containing the
concatenation of all values separated by a delimiter:
[source,esql]
----
include::{esql-specs}/string.csv-spec[tag=mv_concat]
----
Returns:
[%header,format=dsv,separator=|]
|===
include::{esql-specs}/string.csv-spec[tag=mv_concat-result]
|===
If you want to concat non-string fields call <<esql-to_string>> on them first:
[source,esql]
----
include::{esql-specs}/ints.csv-spec[tag=mv_concat]
----
Returns:
[%header,format=dsv,separator=|]
|===
include::{esql-specs}/ints.csv-spec[tag=mv_concat-result]
|===