mv_concat.asciidoc 692 B

12345678910111213141516171819202122232425
  1. [[esql-mv_concat]]
  2. === `MV_CONCAT`
  3. Converts a multivalued string field into a single valued field containing the
  4. concatenation of all values separated by a delimiter:
  5. [source.merge.styled,esql]
  6. ----
  7. include::{esql-specs}/string.csv-spec[tag=mv_concat]
  8. ----
  9. [%header.monospaced.styled,format=dsv,separator=|]
  10. |===
  11. include::{esql-specs}/string.csv-spec[tag=mv_concat-result]
  12. |===
  13. If you want to concat non-string fields call <<esql-to_string>> on them first:
  14. [source.merge.styled,esql]
  15. ----
  16. include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string]
  17. ----
  18. [%header.monospaced.styled,format=dsv,separator=|]
  19. |===
  20. include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string-result]
  21. |===