mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 09:54:06 -04:00
This adds more tests for some of the `MV_` functions and updates their docs now that the railroad diagram and table generated by the tests covers all of the types.
32 lines
841 B
Text
32 lines
841 B
Text
[discrete]
|
|
[[esql-mv_concat]]
|
|
=== `MV_CONCAT`
|
|
[.text-center]
|
|
image::esql/functions/signature/mv_concat.svg[Embedded,opts=inline]
|
|
|
|
Converts a multivalued string field into a single valued field containing the
|
|
concatenation of all values separated by a delimiter:
|
|
|
|
[source.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/string.csv-spec[tag=mv_concat]
|
|
----
|
|
[%header.monospaced.styled,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.merge.styled,esql]
|
|
----
|
|
include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string]
|
|
----
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
|
|===
|
|
include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string-result]
|
|
|===
|
|
|
|
Supported types:
|
|
|
|
include::types/mv_concat.asciidoc[]
|