Geo_shape and NullPointerException

Hello,
I am testing out the geo_shape type described here:
http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html
I have created a mapping and provided a sample data to it, but
ElasticSearch throws a NullPointerException at me, more details here:


Am I sending the data in wrong format?

P.

--

Elastic search is currently not very forgiving when it comes to these
things and it doesn't help that the examples in the documents are fragments
rather than complete working examples.

I've pasted a working mapping that uses geo_shape
here: sample mapping with geo_shape - Pastebin.com

I've only managed to get filter queries working with this. With the regular
query I always run into a max clauses error.
Jilles

On Thursday, January 24, 2013 12:57:19 PM UTC+1, Przemek wrote:

Hello,
I am testing out the geo_shape type described here:
Elasticsearch Platform — Find real-time answers at scale | Elastic
I have created a mapping and provided a sample data to it, but
Elasticsearch throws a NullPointerException at me, more details here:
elasticsearch_multipolygon_error · GitHub
Am I sending the data in wrong format?

P.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Yep, format is wrong. Wrap coordinates to one more array. Like this:
{
"boundaries" : {
"type" : "multipolygon",
"coordinates" :
[[[
[-74.0137499999999, 40.728304],
[-74.0137349999999, 40.728302],
[-74.0137429999999, 40.7282450000001],
[-74.013888, 40.728258],
[-74.0138789999999, 40.7283140000001],
[-74.0137499999999, 40.728304]
]]]
},
"_id" : 3
}

Hello, I am testing out the geo_shape type described here: http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html I have created a mapping and provided a sample data to it, but ElasticSearch throws a NullPointerException at me, more details here: https://gist.github.com/5ca45633dede9cc8dc1c Am I sending the data in wrong format?

P.

--

Yeah, looks like that is the problem indeed. Probably, es needs a bit more
friendly error here. This is a common mistake with geojson.

Jilles

On Wednesday, January 28, 2015 at 2:16:25 PM UTC+1, Roman Drogolov wrote:

Yep, format is wrong. Wrap coordinates to one more array. Like this:
{
"boundaries" : {
"type" : "multipolygon",
"coordinates" :
[[[
[-74.0137499999999, 40.728304],
[-74.0137349999999, 40.728302],
[-74.0137429999999,
40.7282450000001],
[-74.013888, 40.728258],
[-74.0138789999999,
40.7283140000001],
[-74.0137499999999, 40.728304]
]]]
},
"_id" : 3
}

Przemek wrote

Hello,
I am testing out the geo_shape type described here:
Elasticsearch Platform — Find real-time answers at scale | Elastic
I have created a mapping and provided a sample data to it, but
Elasticsearch throws a NullPointerException at me, more details here:
elasticsearch_multipolygon_error · GitHub
Am I sending the data in wrong format?

P.

--

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/geo-shape-and-NullPointerException-tp4028704p4069653.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/45315391-73c2-4c22-a6c3-3353c91151d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.