jprante / elasticsearch-xml

XML interface for Elasticsearch REST
Apache License 2.0
44 stars 5 forks source link

MapperParsingException #4

Closed richardpeng closed 10 years ago

richardpeng commented 10 years ago

When I run the example command:

curl -XPOST -H 'Content-type: application/xml' '0:9200/a/c/1' -d '<root><name attr="test">value</name></root>'

I get this:

{"error":"MapperParsingException[failed to parse]; nested: ElasticsearchParseException[Failed to derive xcontent from (offset=0, length=43): [60, 114, 111, 111, 116, 62, 60, 110, 97, 109, 101, 32, 97, 116, 116, 114, 61, 34, 116, 101, 115, 116, 34, 62, 118, 97, 108, 117, 101, 60, 47, 110, 97, 109, 101, 62, 60, 47, 114, 111, 111, 116, 62]]; ","status":400}
jprante commented 10 years ago

Thanks. This is an error in the documentation. It should read

curl -XPOST -H 'Accept: application/xml' '0:9200/a/c/1' -d '<root><name attr="test">value</name></root>'
richardpeng commented 10 years ago

Thanks, that worked!