-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
rename 'polygon' field to 'shape' to match pelias/schema #134
Conversation
BREAKING CHANGE: the setPolygon() and getPolygon() methods are replaced by setShape() & getShape(). This ensures the field and method names are consistent with Pelias Schema.
e336566
to
27b21bd
Compare
Yeah, to be clear, outside of little bits of testing out functionality for importing geometries (as part of pelias/whosonfirst#19, pelias/api#1121, etc), this method has never been used. In the past, we've had a lot of problems with importing geometries into Elasticsearch (poor performance, rejection of large geometries like that of New Zealand by Elasticsearch), but at least theoretically we should allow it. Either that or we should delete the |
Agh ok, so I'm also not against removing the field instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am OK with the removing or renaming of the field. 👍
Both solutions will create a breaking change...
Can't believe we had this bug for 3+ years :) I'm skeptical Elasticsearch |
This fixes an incorrect model function that was expecting a property called `polygon` in the Elasticsearch schema. The correct property is `shape`. See pelias/model#134
The setPolygon() and getPolygon() methods are replaced by setShape() & getShape().
This ensures the field and method names are consistent with Pelias Schema.
As discussed in pelias/schema#466 the field name should be
shape
, notpolygon
.It's astounding that it's gone 3 years without anyone noticing that it didn't actually work, most likely because it's not very often used.