Unable to save the array of json object in elasticsearch. Need to save it as string

I want to save this kind of data as a string in elasticsearch, but it fails to save

[{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"they "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"they qwe "},{"flag":0,"amt":-0.6811887,"code":0.5060151,"start":0,"end":0,"phrase":"i\\'m "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"i\\'m sd "},{"flag":0,"amt":-0.6072952,"code":0.5448225,"start":0,"end":0,"phrase":"i\\'m sd whatevrt "},{"flag":0,"amt":-0.8052968,"code":0.44695523,"start":0,"end":0,"phrase":"i\\'m sd whatevrt um "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"i\\'m sd whatevrt um mabe "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"i\\'m sd whatevrt um mabe with "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"i\\'m sd whatevrt um mabe with pool "},{"flag":0,"amt":0,"code":1,"start":0,"end":0,"phrase":"no "}]

I tried the following mapping
"data": { "type": "object", "enabled": false },

But didn't worked.

I am getting the following error while saving.

"Unexpected character ('f' (code 102)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper@31222dc0; line: 3, column: 19]"

Thanks in advance.

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