|
7 | 7 | Converts a field in the currently ingested document to a different type, such as converting a string to an integer. |
8 | 8 | If the field value is an array, all members will be converted. |
9 | 9 |
|
10 | | -The supported types include: `integer`, `long`, `float`, `double`, `string`, `boolean`, and `auto`. |
| 10 | +The supported types include: `integer`, `long`, `float`, `double`, `string`, `boolean`, `ip`, and `auto`. |
11 | 11 |
|
12 | 12 | Specifying `boolean` will set the field to true if its string value is equal to `true` (ignore case), to |
13 | 13 | false if its string value is equal to `false` (ignore case), or it will throw an exception otherwise. |
14 | 14 |
|
15 | | -Specifying `auto` will attempt to convert the string-valued `field` into the closest non-string type. |
| 15 | +Specifying `ip` will set the target field to the value of `field` if it contains a valid IPv4 or IPv6 address |
| 16 | +that can be indexed into an <<ip,IP field type>>. |
| 17 | + |
| 18 | +Specifying `auto` will attempt to convert the string-valued `field` into the closest non-string, non-IP type. |
16 | 19 | For example, a field whose value is `"true"` will be converted to its respective boolean type: `true`. Do note |
17 | 20 | that float takes precedence of double in `auto`. A value of `"242.15"` will "automatically" be converted to |
18 | | -`242.15` of type `float`. If a provided field cannot be appropriately converted, the Convert Processor will |
| 21 | +`242.15` of type `float`. If a provided field cannot be appropriately converted, the processor will |
19 | 22 | still process successfully and leave the field value as-is. In such a case, `target_field` will |
20 | | -still be updated with the unconverted field value. |
| 23 | +be updated with the unconverted field value. |
21 | 24 |
|
22 | 25 | [[convert-options]] |
23 | 26 | .Convert Options |
|
0 commit comments