split.asciidoc 989 B

123456789101112131415161718192021222324252627
  1. [[split-processor]]
  2. === Split Processor
  3. Splits a field into an array using a separator character. Only works on string fields.
  4. [[split-options]]
  5. .Split Options
  6. [options="header"]
  7. |======
  8. | Name | Required | Default | Description
  9. | `field` | yes | - | The field to split
  10. | `separator` | yes | - | A regex which matches the separator, eg `,` or `\s+`
  11. | `target_field` | no | `field` | The field to assign the split value to, by default `field` is updated in-place
  12. | `ignore_missing` | no | `false` | If `true` and `field` does not exist, the processor quietly exits without modifying the document
  13. include::common-options.asciidoc[]
  14. |======
  15. [source,js]
  16. --------------------------------------------------
  17. {
  18. "split": {
  19. "field": "my_field",
  20. "separator": "\\s+" <1>
  21. }
  22. }
  23. --------------------------------------------------
  24. // NOTCONSOLE
  25. <1> Treat all consecutive whitespace characters as a single separator