I have a document which I want to send in a newly created index (mapping is not yet done). Below is sample document ,
{
"client" : "",
"timestamp" : 1587995978942,
"log_level" : "INFO",
"log_message" : "Some big message"
}
Now I want to create mapping without calling mapping api. Elasticsearch will add default mapping based on my data like client and log_level will be of type text.But in any possible way am I able to add this mapping by my own without calling mapping api because I want to make client and log_level fields of type keyword. I am using AWS kinesis firehose delivery stream to put data into elasticsearch which dont allow me to create mapping.
One typically uses dynamic_templates but those are also defined within the mappings
settings of your index...
An alternative could be utilizing the index template APIs.