# Json\_parse\_exception on reindex

**URL:** https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838
**Category:** Elasticsearch
**Created:** [October 24, 2018, 3:20pm UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838 "2018-10-24T15:20:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [October 24, 2018, 3:20pm UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/1 "2018-10-24T15:20:10Z")

</div>

I'm getting json\_parse\_exception on reindex from a bunch of daily indices to a consolidated monthly one, quite likely due to the same field in different daily indices being automapped to different types.

How do I tell reindex to ignore these errors - drop the erroneous fields, drop the records that contain them, I don't care really, it's just that **I do want the other 99.99% of the data**?

```
{
  "took": 6943,
  "timed_out": false,
  "total": 16776617,
  "updated": 6999,
  "created": 0,
  "deleted": 0,
  "batches": 7,
  "version_conflicts": 0,
  "noops": 0,
  "retries": {
    "bulk": 0,
    "search": 0
  },
  "throttled_millis": 0,
  "requests_per_second": -1,
  "throttled_until_millis": 0,
  "failures": [
    {
      "index": "filebeat-2018.01",
      "type": "doc",
      "id": "AWEDf0pgq8giAw7TVsri",
      "cause": {
        "type": "mapper_parsing_exception",
        "reason": "failed to parse [json.provision.assets.asset-instance.virtual]",
        "caused_by": {
          "type": "json_parse_exception",
          "reason": "Current token (VALUE_TRUE) not numeric, can not use numeric value accessors\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@5b323cb5; line: 1, column: 596]"
        }
      },
      "status": 400
    }
  ]
}
```

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [October 25, 2018, 6:38am UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/2 "2018-10-25T06:38:24Z")

</div>

can you compare that document with any other file beat doc, that also has a `json.provision.assets.asset-instance.virtual` field? Is it possible that the structure from this single document is different? Also, did you compare that both indices, the one you indexed from and the one you indexed to have the same mapping?

---

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [October 25, 2018, 8:08am UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/3 "2018-10-25T08:08:04Z")

</div>

I haven't done any manual investigation of that particular field - that's exactly the sort of thing I don't want to have to spend time doing, particularly as I have many gigabytes of these logs in a year's worth of daily indices and heaven knows how many instances of such things. I just want to reindex all the records that don't have problems!

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [October 25, 2018, 9:34am UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/4 "2018-10-25T09:34:00Z")

</div>

You can use `conflicts: proceed` to ignore errors, see [https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-reindex.html)

---

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [October 25, 2018, 9:40am UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/5 "2018-10-25T09:40:53Z")

</div>

Yes, I tried that, it doesn't work (it apparently ignores version conflict errors but not the errors I'm getting).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 22, 2018, 9:46am UTC](https://discuss.elastic.co/t/json-parse-exception-on-reindex/153838/6 "2018-11-22T09:46:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
