Hi all,
I am trying to create a new Type in same Index as below.
I already have created a index like below, which has more than 200 data.
post _bulk
{"index":{"_index" : "bank", "_type" : "account", "_id":"1"}}
{"account_number":1,"balance":39225,"firstname":"Amber","lastname":"Duke","age":32,"gender":"M","address":"880 Holmes Lane","employer":"Pyrami","email":"amberduke@pyrami.com","city":"Brogan","state":"IL"}
Because I am just learning elasticsearch query, so wanted to work on lesser data. So I thought of creating the same index with different Type name (with same data , just 10-15 row of data)
post _bulk
{"index":{"_index" : "bank", "_type" : "fewaccounts", "_id":"1"}}
{"account_number":1,"balance":39225,"firstname":"Amber","lastname":"Duke","age":32,"gender":"M","address":"880 Holmes Lane","employer":"Pyrami","email":"amberduke@pyrami.com","city":"Brogan","state":"IL"}
When trying to run above query, getting error as below
"index": {
"_index": "bank",
"_type": "fewaccounts",
"_id": "6",
"status": 400,
"error": {
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [bank] as the final mapping would have more than 1 type: [fewaccounts, account]"
I know for learning purpose , i can create a new index and new type. But I would like to know why am I getting this error, and how to fix it.
Thanks in advance.