0
votes

i studying elasticsearch. and contact error i don't know resolve this problem.

my elastic version 0.9 my java version 1.7 my linux centos 6.X

i want create document 'euc-kr' charset. but error occured.

this putty terminal code

#  curl -XPOST http://localhost:9200/korea -d '{"mappings" : { "car" : { "properties" : { "name" : { "type" : "string" }, "detail" : { "type" : "string", "index" : "analyzed", "fields" : { "details" : { "type" : "string", "index" : "not_analyzed" } } } }}}}'

#  curl -XPOST http://localhost:9200/korea/car -d '{ "name" : "제네시스", "detail" : "현대에서 만든 차" }'

{"error":"MapperParsingException[failed to parse [name]]; nested: JsonParseException[Invalid UTF-8 start byte 0xb3\n at [Source: [B@6118f155; line: 1, column: 16]]; ","status":400}

1
you have written that you use elastic version 0.9? it's very old release, are you sure?Vladislav Kysliy
sure.. if input english word success, if input korean word failed...what's reason.? i don't know it...Nam chchon
any luck with my answer?Vladislav Kysliy

1 Answers

0
votes

You need to convert text from your charset to UTF8. How to do this it depends on what client you use to generate JSON. I suggest read this topics:

Does fluent-plugin-elasticsearch convert to UTF-8 before creating json?
What to do with non utf8 characters