From 15e863835803ac21bbc94acea8eb34e632f8061b Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 8 Apr 2019 12:06:19 -0400 Subject: [PATCH 1/2] [DOCS] Document unsupported field datatypes and limits for JSON objects with --- .../reference/mapping/params/ignore-malformed.asciidoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/reference/mapping/params/ignore-malformed.asciidoc b/docs/reference/mapping/params/ignore-malformed.asciidoc index 30aa6c4e8bc0d..527d8f9609bfa 100644 --- a/docs/reference/mapping/params/ignore-malformed.asciidoc +++ b/docs/reference/mapping/params/ignore-malformed.asciidoc @@ -91,3 +91,13 @@ become meaningless. Elasticsearch makes it easy to check how many documents have malformed fields by using `exist` or `term` queries on the special <> field. +==== Limits for JSON Objects + +You can't use `ignore_malformed` to index JSON objects into field datatypes used +for other data formats, like `text` or `integer`. + +Similarly, `ignore_malformed` does not support datatypes used for JSON objects, including: + +* <> +* <> +* <> \ No newline at end of file From 99f135d060a4bce4f27d4cac07c35f89006fbb8e Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 9 Apr 2019 09:23:09 -0400 Subject: [PATCH 2/2] [DOCS] Revise limits for JSON objects --- .../mapping/params/ignore-malformed.asciidoc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/reference/mapping/params/ignore-malformed.asciidoc b/docs/reference/mapping/params/ignore-malformed.asciidoc index 527d8f9609bfa..f8f9a4591f947 100644 --- a/docs/reference/mapping/params/ignore-malformed.asciidoc +++ b/docs/reference/mapping/params/ignore-malformed.asciidoc @@ -92,12 +92,15 @@ have malformed fields by using `exist` or `term` queries on the special <> field. ==== Limits for JSON Objects - -You can't use `ignore_malformed` to index JSON objects into field datatypes used -for other data formats, like `text` or `integer`. - -Similarly, `ignore_malformed` does not support datatypes used for JSON objects, including: +You can't use `ignore_malformed` with the following datatypes: * <> * <> -* <> \ No newline at end of file +* <> + +You also can't use `ignore_malformed` to ignore JSON objects submitted to fields +of the wrong datatype. A JSON object is any data surrounded by curly brackets +`"{}"` and includes data mapped to the nested, object, and range datatypes. + +If you submit a JSON object to an unsupported field, {es} will return an error +and reject the entire document regardless of the `ignore_malformed` setting. \ No newline at end of file