Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geo_shape null geometry #3310

Closed
jillesvangurp opened this Issue Jul 10, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@jillesvangurp
Copy link
Contributor

jillesvangurp commented Jul 10, 2013

I have a geojson file generated using ogr2ogr from a shape file.Unfortunately some of the geometry objects are null but I still want to index the other meta data. Currently I get a parse error on these documents because the geo_shape parser is not handling json nulls. I think it would be nicer to not fail and simply not index the geo_shape field for those fields. Would it be possible to fix this?

Here's a sample document. It fails on the geometry field (which is mapped to geo_shape). The error I get is: MapperParsingException[failed to parse [geometry]]; nested: ElasticSearchParseException[Shape must be an object consisting of type and coordinates];

{ "type": "Feature", "properties": { "name": "吉井町宮田", "qs_id": 856730, "gn_id": null, "woe_id": 28484701, "gn_id_eh": null, "woe_id_eh": null, "gn_name": null, "gn_ascii": null, "gn_country": null, "gn_admin1": null, "gn_admin2": null, "gn_pop": null, "gn_fclass": null, "gn_fcode": null, "woe_name": "吉井町宮田", "woe_nameen": null, "placetype": "LocalAdmin", "iso": "JP", "language": "JPN", "parent_id": 28379393, "woe_local": 28379393, "woe_lau": 28484701, "woe_adm2": 0, "woe_adm1": 58646425, "woe_adm0": 23424856, "name_local": "うきは市", "name_lau": "吉井町宮田", "name_adm2": null, "name_adm1": "福岡県", "name_adm0": "日本", "gns_id": null, "accuracy": null, "matchtype": null, "geom_qual": null, "woe_funk": null, "photos": null, "photos_all": null, "woemembers": null, "photos_1k": null, "photos_9k": null, "photos_sr": 0, "photos_9r": 0, "pop_sr": 0 }, "geometry": null }

@ghost ghost assigned chilling Jul 10, 2013

@chilling

This comment has been minimized.

Copy link
Contributor

chilling commented Jul 15, 2013

Hi @jillesvangurp, setting shapes to null is part of the geo-refactoring in 1.0 inspired by #2708. Nevertheless the current version also throws a parsing exception. I'll fix this for 1.0 as soon as possible.

chilling added a commit to chilling/elasticsearch that referenced this issue Jul 15, 2013

@chilling chilling closed this in 6e9ad03 Jul 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.