Post Json with mapping

How can i insert a json and directly have new values mapped in correct format ?
e.g. the field "amount" is not yet in my index and hence also not yet mapped. My index is having a lot of different values with a mapping already and i dont want to completely map all values new.
How can i insert the document with telling how to map ? I want this json inserted with location as text and amount as numeric:

POST index/_doc
{
"location": "Germany",
"amount": "15",
}

You just ingest data and Elasticseach will do the dynamic mapping: https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.