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

[crash] ES should reorder envelope corners #2544

Closed
mvrhov opened this issue Jan 14, 2013 · 6 comments · Fixed by #9091
Closed

[crash] ES should reorder envelope corners #2544

mvrhov opened this issue Jan 14, 2013 · 6 comments · Fixed by #9091
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug good first issue low hanging fruit v1.4.3 v1.5.0 v2.0.0-beta1

Comments

@mvrhov
Copy link

mvrhov commented Jan 14, 2013

It might happen that the coordinates for an envelope geo type arrive in top right bottom left. When that happens right now ES 0.20.2 the ES dies with oom. When you look at the hprof dump all you see is millions of org.elasticsearch.common.lucene.spatial.prefix.tree.GeohashPrefixTree$GhCell objects in my case that was about 6mio worth of them.

I see two solutions to this:

  • be friendly and correct the coordinates to be in proper order top left, bottom right
  • return an error
@s1monw
Copy link
Contributor

s1monw commented Mar 2, 2013

hey, I think this has been fixed but can you provide a testcase for this to make sure I am not missing it?

@mvrhov
Copy link
Author

mvrhov commented Mar 5, 2013

Hi, It has not been fixed.
e.g. ,"coordinates":[[150.5981,-30.548016666667],[150.06046666666,-31.037683333334]] will still break the 0.90b1

@chilling
Copy link
Contributor

Hi @mvrhov, can you provide an example how you use these coordinates. Do you use this in a filter or a query? I just tested it myself and I also do not receive any error response. So I'm going to fix this.

@mvrhov
Copy link
Author

mvrhov commented Jun 10, 2013

@chilling: I haven't tested this since 0.90b1 come out. However the oom was happening when inserting a new record.

@chilling
Copy link
Contributor

Ok. I think currently this error will be ignored but I'm going to fixit. The solution will be returning an error rather than autocorrecting it.

@ghost ghost assigned chilling Oct 30, 2013
@clintongormley clintongormley added the :Analytics/Geo Indexing, search aggregations of geo points and shapes label Nov 10, 2014
@missinglink
Copy link
Contributor

ref: #9080

@nknize nknize self-assigned this Dec 29, 2014
nknize added a commit to nknize/elasticsearch that referenced this issue Dec 30, 2014
ShapeBuilder expected coordinates for Envelope types in strict Top-Left, Bottom-Right order. Given that GeoJSON does not enforce coordinate order (as seen in elastic#8672) clients could specify envelope bounds in any order and be compliant with the GeoJSON spec but not the ES ShapeBuilder logic. This change loosens the ShapeBuilder requirements on envelope coordinate order, reordering where necessary.

closes elastic#2544
closes elastic#9067
closes elastic#9079
closes elastic#9080
nknize added a commit that referenced this issue Dec 30, 2014
ShapeBuilder expected coordinates for Envelope types in strict Top-Left, Bottom-Right order. Given that GeoJSON does not enforce coordinate order (as seen in #8672) clients could specify envelope bounds in any order and be compliant with the GeoJSON spec but not the ES ShapeBuilder logic. This change loosens the ShapeBuilder requirements on envelope coordinate order, reordering where necessary.

closes #2544
closes #9067
closes #9079
closes #9080
nknize added a commit that referenced this issue Dec 30, 2014
ShapeBuilder expected coordinates for Envelope types in strict Top-Left, Bottom-Right order. Given that GeoJSON does not enforce coordinate order (as seen in #8672) clients could specify envelope bounds in any order and be compliant with the GeoJSON spec but not the ES ShapeBuilder logic. This change loosens the ShapeBuilder requirements on envelope coordinate order, reordering where necessary.

closes #2544
closes #9067
closes #9079
closes #9080
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
ShapeBuilder expected coordinates for Envelope types in strict Top-Left, Bottom-Right order. Given that GeoJSON does not enforce coordinate order (as seen in elastic#8672) clients could specify envelope bounds in any order and be compliant with the GeoJSON spec but not the ES ShapeBuilder logic. This change loosens the ShapeBuilder requirements on envelope coordinate order, reordering where necessary.

closes elastic#2544
closes elastic#9067
closes elastic#9079
closes elastic#9080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug good first issue low hanging fruit v1.4.3 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants