Skip to content

Commit 51d63db

Browse files
introduce bullet list in auto section
1 parent 49996aa commit 51d63db

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/reference/enrich-processor/convert-processor.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@ The supported types are: `integer`, `long`, `float`, `double`, `string`, `boolea
2121
| `ip` | `String` values containing a valid IPv4 or IPv6 address that can be indexed into an [IP field type](/reference/elasticsearch/mapping-reference/ip.md) |
2222
| `auto` | All values (see below) |
2323

24-
Specifying `auto` will attempt to convert a string-valued `field` into the closest non-string, non-IP type. For example,
25-
a field whose value is `"true"` will be converted to its respective boolean type: `true`. A string representing an
26-
integer in decimal or hex format (e.g. `"123"` or `"0x7b"`) will be converted to an `Integer` if the number fits in a
27-
32-bit signed integer, else to a `Long` if it fits in a 64-bit signed integer, else to a `Float` (in which case it may
28-
lose precision, and will give positive or negative infinity if out of range for a 32-bit floating point value). A string
29-
representing a floating point number in decimal, scientific, or hex format (e.g. `"123.0"`, `"123.45"`, `"1.23e2"`, or
30-
`"0x1.ecp6"`) will be converted to a `Float` (and may lose precision, and will give positive or negative infinity if out
31-
of range for a 32-bit floating point value). If a provided field is either not a `String` or a `String` which cannot be
32-
converted, the processor will still process successfully and leave the field value as-is. In such a case, `target_field`
33-
will be updated with the unconverted field value.
24+
Specifying `auto` will attempt to convert a string-valued `field` into the closest non-string, non-IP type:
25+
- A whose value is `"true"` or `"false"` (case insensitive) will be converted to a `Boolean`.
26+
- A string representing an integer in decimal or hex format (e.g. `"123"` or `"0x7b"`) will be converted to an `Integer` if the number fits in a 32-bit signed integer, else to a `Long` if it fits in a 64-bit signed integer, else to a `Float` (in which case it may
27+
lose precision, and will give positive or negative infinity if out of range for a 32-bit floating point value).
28+
- A string representing a floating point number in decimal, scientific, or hex format (e.g. `"123.0"`, `"123.45"`, `"1.23e2"`, or `"0x1.ecp6"`) will be converted to a `Float` (and may lose precision, and will give positive or negative infinity if out of range for a 32-bit floating point value).
29+
30+
Using `auto` with to convert a `field` which is either not a `String` or a `String` which cannot be will leave the field
31+
value as-is. In such a case, `target_field` will be updated with the unconverted field value.
3432

3533
:::{tip}
3634
If conversions other than those provided by this processor are required, the

0 commit comments

Comments
 (0)