I am getting mapper_parsing_exception ,while integrating elastic stack with the Node application

Hi All,

While integrating Node application with ELK i am getting below error ,

statusCode: 400,
response:
'{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [buffer] declared on field [data]"}],"type":"mapper_parsing_exception","reason":"No handler for type [buffer] declared on field [data]"},"status":400}',

I am storing photo in below model,
photo: {
data: Buffer,
contentType: String
}

Please help me with this , I have used most of the lower version of elastic search but result is same .

Thanks and Regards,
Vishal

a Buffer looks like a node.js instance type to me, which Elasticsearch cannot handle. You need to convert that into a base64 string - I'd personally try to not to store such data in Elasticsearch, but put it elsewhere and then store the location in the JSON.