Mapping ElasticSearch MapperParsingException Object

I am describing an article about ElasticSearch, and I am trying to bring this example to my engine.

Example:

curl -XPUT 'elasticsearch:9200/twitter/tweet/1' -d '{ "user": "david", "message": "C'est mon premier message de la journรฉe !", "postDate": "2010-03-15T15:23:56", "priority": 2, "rank": 10.2 }' 

I am trying to send this information via a bash file (I am using Putty), but I have this errror:

 {"error":"MapperParsingException[object mapping for [tweet] tried to parse as object, but got EOF, has a concrete value been provided to it?]","status":400} 

I am also trying to see one error with "cat -e tweet.sh", but I do not understand why I have this error.

Thanks in advance.

+6
source share
1 answer

This is a type of mismatch. I also encounter such a problem. It looks like you are trying to index a value into a json display object. those. you once indexed something like this:

 { "obj1": { "field1": "value1" } } 

and then index this:

 { "obj1": "value" } 

Check the existing mapping via elasticsearch:9200/twitter/_mapping and you will see that this one of the fields has been indexed as object

+8
source

All Articles