elasticsearch/elasticsearch — pull request #2770 by spinscale (2013-03-13 08:40:49+00:00)
Title: GeoJSONShapeParser parses JSON correctly if "crs" field is included

Fixes #2763

The [http://www.geojson.org/geojson-spec.html](GeoJSON spec) defines additional fields like `bbox` and `crs`. The latter one can include its own `type` field, which might overwrite the shape type in the current parser implementation.

This fix simply skips the `bbox` and `crs` fields during parsing if found, so that no overwriting happens. In addition the skipping prevents the parser from exiting too early, because of finding the end of an object.