1
0

bytes.asciidoc 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. [[bytes-processor]]
  2. === Bytes processor
  3. ++++
  4. <titleabbrev>Bytes</titleabbrev>
  5. ++++
  6. Converts a human readable byte value (e.g. 1kb) to its value in bytes (e.g. 1024). If the field is an array of strings, all members of the array will be converted.
  7. Supported human readable units are "b", "kb", "mb", "gb", "tb", "pb" case insensitive. An error will occur if
  8. the field is not a supported format or resultant value exceeds 2^63.
  9. [[bytes-options]]
  10. .Bytes Options
  11. [options="header"]
  12. |======
  13. | Name | Required | Default | Description
  14. | `field` | yes | - | The field to convert
  15. | `target_field` | no | `field` | The field to assign the converted value to, by default `field` is updated in-place
  16. | `ignore_missing` | no | `false` | If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document
  17. include::common-options.asciidoc[]
  18. |======
  19. [source,js]
  20. --------------------------------------------------
  21. {
  22. "bytes": {
  23. "field": "file.size"
  24. }
  25. }
  26. --------------------------------------------------
  27. // NOTCONSOLE