elasticsearch/docs/reference/ingest
Keith Massey f327352601
Making JsonProcessor stricter so that it does not silently drop data (#93179)
This PR makes JsonProcessor's JSON parsing a little bit stricter so that
we are not silently dropping data when given bad inputs. Previously if
the input string began with something that could be parsed as a valid
json field, then the processor would grab that and ignore the rest. For
example, `123 "foo"` would be parsed as `123`, dropping the `"foo"`. Now
by default it will throw an IllegalArgumentException on a string like
this. A user can now set the `strict_json_parsing` parameter to false to
get the old behavior. For example:

```
POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "description": "",
    "processors" : [
      {
        "json" : {
          "field" : "message",
          "strict_json_parsing": false
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "message": "123 \"foo\""
      }
    }
  ]
}'
```

Closes #92898
2023-01-24 18:43:35 -05:00
..
apis Ingest: IngestDocument requires non-null version (#87665) 2022-06-15 07:50:45 -05:00
processors Making JsonProcessor stricter so that it does not silently drop data (#93179) 2023-01-24 18:43:35 -05:00
common-log-format-example.asciidoc [DOCS] Fixes broken example in pipeline tutorial (#89315) 2022-08-16 08:40:10 +02:00
enrich.asciidoc [DOCS] Remove testenv annotations from doc snippet tests (#80023) 2021-11-05 18:38:50 -04:00
geo-match-enrich-policy-type-ex.asciidoc [DOCS] Remove testenv annotations from doc snippet tests (#80023) 2021-11-05 18:38:50 -04:00
match-enrich-policy-type-ex.asciidoc [DOCS] Remove testenv annotations from doc snippet tests (#80023) 2021-11-05 18:38:50 -04:00
processors.asciidoc Move the ingest attachment processor to the default distribution (#87989) 2022-06-28 02:10:36 -04:00
range-enrich-policy-type-ex.asciidoc [DOCS] Remove testenv annotations from doc snippet tests (#80023) 2021-11-05 18:38:50 -04:00