Skip to content

Commit 6d16d64

Browse files
authored
[DOCS] IP type for convert processor (#70599) (#70669)
1 parent e58477c commit 6d16d64

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/reference/ingest/processors/convert.asciidoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
Converts a field in the currently ingested document to a different type, such as converting a string to an integer.
88
If the field value is an array, all members will be converted.
99

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`.
1111

1212
Specifying `boolean` will set the field to true if its string value is equal to `true` (ignore case), to
1313
false if its string value is equal to `false` (ignore case), or it will throw an exception otherwise.
1414

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.
1619
For example, a field whose value is `"true"` will be converted to its respective boolean type: `true`. Do note
1720
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
1922
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.
2124

2225
[[convert-options]]
2326
.Convert Options

0 commit comments

Comments
 (0)