I am using npm elasticsearch, in that getting an error like this
client.index is not a function
here is my code
encryptObj = enpyt.encrypt(function(encrypted){
client.index({
index: 'collectionnew3
id: '101',
type: 'collectiontype3',
body: {
"username": "postgres",
"pswrd": encrypted,
}
},function(err,resp,status) {
console.log(resp);
})
})
Any idea why am I getting this?