we are migrating from an old elasticsearch version to 8.12 and for some documents we are seeing validation error like Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 548;
i know its a check exists in the code it self here
any suggestions to handle this scenario if my requirement is to accommodate ids more than 512b byte
Any help will be really very helpful
If you use reindex for migration you can check this solution: Reindexing failed - Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 672; - #4 by JinnaBalu
POST /_reindex?wait_for_completion=true&pretty=true
{
"source": {
"index": "student"
},
"dest": {
"index": "new_student"
},
"script": {
"source": "if (ctx._id.length() > 512) {ctx._id = null}",
"lang": "painless"
}
}
1 Like