_reindex: Validation Failed: 1: id is too long, must be no longer than 512 bytes but was: 1012

This is an elasticsearch platform upgrade project, we are targeting to migrate legacy data which is collected in past 2 years from elasticsearch 1.5.* to 6.1..
when I perform _reindex to move the data, I got the following errors.
I already know it's the limitation of _id since 2.

my _mappings like
"_index": "index",
"_type": "url",
"_id": "http://*****",
"_score": 1,
"_source": {
"url": "https://****(the same value as _id)",
"created": "2018-01-31T03:57:37.433Z",
"updated": "2018-01-31T03:57:37.433Z",
"status": "",
"fetched": ""
but I want to know any best practice to solve this problem

this works for me, the new id will be generated with hash
POST _reindex?pretty&wait_for_completion=false
"conflicts": "proceed",
"source": {
"remote": {
"host": "http://"
"index": "index",
"dest": {
"index": "index",
"version_type": "internal"
"script": {
"lang": "painless",
"source": "ctx._id=null"

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