Hi @Karthik2411,
This is because you can't change the mapping of an existing index without reindexing your data. You might find the details in this thread helpful: How to change the field type of data loaded in Kibana
To quote from the answer in that discussion,
You cannot
PUT
a mapping for an existing index. You have 2 options: create a new index with the correct mappings and move the documents over with a reindex, or delete the index and recreate it with the correct mappings and then index the documents again.
Hope this helps!