I am using offical elasticsearch npm. In my node app i am creating index using that client as follows
client.create({
index: orgID, ---------->This is dynamic
type: "places",
body:{}
}, function(error, response){
if(error){
} else {
}
})
I need to PUT MAPPINGs for the above index, So for that i have to create an empty index(index without data) first and then i have to execute put mappings and then i have to put data into index.
So for that i have to create an empty index, but in offical elasticsearch client the above method(create) is written in "POST
" method so its expecting an body.
For that i have to give an empty body {} as above. So how can i create an empty index using official javascript client. Please share your ideas.