# \_reindex with Validation Failed: 1: id is too long

**URL:** https://discuss.elastic.co/t/reindex-with-validation-failed-1-id-is-too-long/167509
**Category:** Elasticsearch
**Created:** [February 7, 2019, 6:56pm UTC](https://discuss.elastic.co/t/reindex-with-validation-failed-1-id-is-too-long/167509 "2019-02-07T18:56:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Serial](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Serial](https://discuss.elastic.co/u/Serial)
#### Post date: [February 7, 2019, 6:56pm UTC](https://discuss.elastic.co/t/reindex-with-validation-failed-1-id-is-too-long/167509/1 "2019-02-07T18:56:51Z")

</div>

Hello,

I'm using ES 5.6.14 and I'm trying to use \_reindex to migrate from v2 index to v5 index, and I have this error.

`{"type":"action_request_validation_exception","reason":"Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 624;"}`

Firstly i tried to fix it using this :  
`"script": { "lang": "painless", "source": "ctx._id=null" }`  
but ES needs not null \_id 😉

So, I tried to managed this error with this script, but it didn't work too :  
`"script": {"lang": "painless","source": "if (ctx._id.length() > 512) { ctx.op = 'noop'}"`  
And the process does not go to the end of reindex.  
Is someone succeeded to deal with it ? And how ?

Thank you

---

<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: [March 7, 2019, 6:56pm UTC](https://discuss.elastic.co/t/reindex-with-validation-failed-1-id-is-too-long/167509/2 "2019-03-07T18:56:59Z")

</div>

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