Skip to content

Commit c60139a

Browse files
author
Christoph Büscher
authored
Clarify mapping types that support ignore_malformed (elastic#48206)
The `ignore_malformed` setting only works on selected mapping types, otherwise we throw an mapper_parsing_exception. We should add a list of all the mapping types that support it, since the number of types not supporting it seems larger. Closes elastic#47166
1 parent 7b1d50a commit c60139a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/reference/mapping/params/ignore-malformed.asciidoc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ user may send a `login` field that is a <<date,`date`>>, and another sends a
77

88
Trying to index the wrong datatype into a field throws an exception by
99
default, and rejects the whole document. The `ignore_malformed` parameter, if
10-
set to `true`, allows the exception to be ignored. The malformed field is not
10+
set to `true`, allows the exception to be ignored. The malformed field is not
1111
indexed, but other fields in the document are processed normally.
1212

1313
For example:
@@ -46,15 +46,24 @@ PUT my_index/_doc/2
4646
<1> This document will have the `text` field indexed, but not the `number_one` field.
4747
<2> This document will be rejected because `number_two` does not allow malformed values.
4848

49+
The `ignore_malformed` setting is currently supported by the following <<mapping-types,mapping types>>:
50+
51+
<<number>>:: `long`, `integer`, `short`, `byte`, `double`, `float`, `half_float`, `scaled_float`
52+
<<date>>:: `date`
53+
<<date_nanos>>:: `date_nanos`
54+
<<geo-point>>:: `geo_point` for lat/lon points
55+
<<geo-shape>>:: `geo_shape` for complex shapes like polygons
56+
<<ip>>:: `ip` for IPv4 and IPv6 addresses
57+
4958
TIP: The `ignore_malformed` setting value can be updated on
5059
existing fields using the <<indices-put-mapping,PUT mapping API>>.
5160

52-
5361
[[ignore-malformed-setting]]
5462
==== Index-level default
5563

5664
The `index.mapping.ignore_malformed` setting can be set on the index level to
57-
allow to ignore malformed content globally across all mapping types.
65+
ignore malformed content globally across all allowed mapping types.
66+
Mapping types that don't support the setting will ignore it if set on the index level.
5867

5968
[source,console]
6069
--------------------------------------------------

0 commit comments

Comments
 (0)