Skip to content

Clarify mapping types that support ignore_malformed #48206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/reference/mapping/params/ignore-malformed.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]
--------------------------------------------------
Expand Down