I want to change my mapping.What should I do to apply new mapping for existing data?please help me out.
POST /thegame/weapons/1
{
"_id": 1,
"name": "Longsword",
"category": "Sharp"
}
GET /thegame/weapons/_mapping
POST /thegame/_close
PUT /thegame/weapons/_mapping?ignore_conflicts=true
{
"weapons": {
"properties": {
"name": {
"type": "long",
},
"category": {
"type": "string"
}
}
}
}
POST /thegame/_open
GET /thegame/_mappings
Firstly,i put a docs it create default mapping (name:{type:string}),I want to change my default mapping (name:{type:long}).It showing me Error.
Please help me out.
If I reindex my data through Snapshot then also i am not able to change my mapping.