What is different with Json and XContentBuilder,how to use it is currectly?

First, I set mapping use kibana like this:
PUT location { "mappings": { "city": { "properties": { "city":{ "type": "text" }, "polygon":{ "type":"geo_shape" }, "time": { "type": "date" } } } } }

git@github.com:SenalChen/esDemo.git
Then I got some exception.I don't know how to put a Object into elasticsearch.I must save some "polygon" to do some intersect.
Is this means type is changed when some Object to Json, and how can I do it with an Java POJO?

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