I have inherited a legacy code which is using Elastic Search API to create indices and index content.
The mapping JSON was created for v1.5 and looks as follows:
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"users": {
"properties": {
"created_at": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"id": {
"type": "double"
},
"name": {
"type": "string"
},
"org_id": {
"type": "double"
},
"type_priority": {
"type": "double"
}
}
},
"comment_idea": {
"properties": {
"author_id": {
"type": "double"
},
"comment": {
"type": "string"
},
"created_at": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"id": {
"type": "double"
},
"idea_id": {
"type": "double"
},
"org_id": {
"type": "double"
}
}
},
}
}
Of course, there are a lot more types such as users, comment_idea as shown in the example above.
As I'm not familiar that well with Elastic Search, my question is how to transform this mapping JSON for 7.1?
As I understand 7.1 has removed types and this mapping JSON is considered invalid - I do not get an error but the mapping is not accepted (created).