How to add a new data field to an existing dataset using Update API in elsticsearch. For example if dataset already contains fields like id but now I need to add a new field name Name and pass a value A.
How to add a new data field to an existing dataset using Update API in elsticsearch. For example if dataset already contains fields like id but now I need to add a new field name Name and pass a value A.
you can use below code to add for example an email field to your existing index
PUT /my-index-000001/_mapping
{
"properties": {
"email": {
"type": "keyword"
}
}
}
refrence: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html