-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Range datatypes reindex failed when upgrading from 5.6 to 6.2 using remote reindex api #29313
Copy link
Copy link
Closed
Description
report error: "[expected_attendees] is defined as an object in mapping [mytype] but this name is already used for a field in other types"
Here is what I did.
- Ceate index and add 1 doc on old host with Elasticsearch 5.6, just as the doc example.
PUT range_index_old
{
"mappings": {
"mytype": {
"properties": {
"expected_attendees": {
"type": "integer_range"
},
"time_frame": {
"type": "date_range",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
}
PUT range_index_old/mytype/1
{
"expected_attendees" : {
"gte" : 10,
"lte" : 20
},
"time_frame" : {
"gte" : "2015-10-31 12:00:00",
"lte" : "2015-11-01"
}
}
- Create a index with the same mapping on new host with Elasticsearch 6.2
PUT range_index_new
{
"mappings": {
"_doc": {
"properties": {
"expected_attendees": {
"type": "integer_range"
},
"time_frame": {
"type": "date_range",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
}
- then reindex from old host to new host following the docs( https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade-remote.html#reindex-upgrade-remote )
POST _reindex
{
"source": {
"remote": {
"host": "http://oldhost:9200",
"username": "user",
"password": "pass"
},
"index": "range_index_old"
},
"dest": {
"index": "range_index_new"
}
}
- I'm getting this error response
{
"took": 14,
"timed_out": false,
"total": 1,
"updated": 0,
"created": 0,
"deleted": 0,
"batches": 1,
"version_conflicts": 0,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1,
"throttled_until_millis": 0,
"failures": [
{
"index": "range_index_new",
"type": "mytype",
"id": "1",
"cause": {
"type": "illegal_argument_exception",
"reason": "[expected_attendees] is defined as an object in mapping [mytype] but this name is already used for a field in other types"
},
"status": 400
}
]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.