How to add documents with extended ASCII and non printable characters (Elastic Search)

curl -XPUT 'http://localhost:9200/test/sample/1' -d '{
{
"msg" : "¶¾è",
}

It throws an exception
{"error":{"root_cause":[{"type":"json_parse_exception","reason":"json_parse_exception: Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: org.elasticsearch.common.io.stream.InputStreamStreamInput@a8c8d54; line: 2, column: 2]"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"json_parse_exception","reason":"json_parse_exception: Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: org.elasticsearch.common.io.stream.InputStreamStreamInput@a8c8d54; line: 2, column: 2]"}},"status":400}

Can someone please throw some light on this?

Thanks

It must be UTF8 encoded.

1 Like

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