Browse Source

Clarify mapping types that support ignore_malformed (#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 #47166
Christoph Büscher 6 years ago
parent
commit
c60139a345
1 changed files with 12 additions and 3 deletions
  1. 12 3
      docs/reference/mapping/params/ignore-malformed.asciidoc

+ 12 - 3
docs/reference/mapping/params/ignore-malformed.asciidoc

@@ -7,7 +7,7 @@ user may send a `login` field that is a <<date,`date`>>, and another sends a
 
 Trying to index the wrong datatype into a field throws an exception by
 default, and rejects the whole document.  The `ignore_malformed` parameter, if
-set to `true`, allows the exception to be ignored.  The malformed field is not
+set to `true`, allows the exception to be ignored. The malformed field is not
 indexed, but other fields in the document are processed normally.
 
 For example:
@@ -46,15 +46,24 @@ PUT my_index/_doc/2
 <1> This document will have the `text` field indexed, but not the `number_one` field.
 <2> This document will be rejected because `number_two` does not allow malformed values.
 
+The `ignore_malformed` setting is currently supported by the following <<mapping-types,mapping types>>:
+
+<<number>>::         `long`, `integer`, `short`, `byte`, `double`, `float`, `half_float`, `scaled_float`
+<<date>>::           `date`
+<<date_nanos>>::     `date_nanos`
+<<geo-point>>::     `geo_point` for lat/lon points
+<<geo-shape>>::     `geo_shape` for complex shapes like polygons
+<<ip>>::            `ip` for IPv4 and IPv6 addresses
+
 TIP: The `ignore_malformed` setting value can be updated on
 existing fields using the <<indices-put-mapping,PUT mapping API>>.
 
-
 [[ignore-malformed-setting]]
 ==== Index-level default
 
 The `index.mapping.ignore_malformed` setting can be set on the index level to
-allow to ignore malformed content globally across all mapping types.
+ignore malformed content globally across all allowed mapping types.
+Mapping types that don't support the setting will ignore it if set on the index level.
 
 [source,console]
 --------------------------------------------------