4 point polygon search for over half the world results in incorrect (opposite) polygon to be searched

Hello,

We are running into an issue that I hope someone can help out with. Small polygons (LESS than the length of 1/2 of the world from east to west) work fine.

Once we increase the size of the polygon to a larger size (say, 2/3 the size of the globe east to west) the results are returned with the OPPOSITE polygon. (Upper right becomes upper left, lower right becomes lower left). I understand why this is happening. Elasticsearch is talking 4 points, and when wrapping the other way creates a smaller polygon than the one intended, it uses that one.

For example:
The following search works just fine
<nabble_img src="example1.png" border="0" alt="Works Fine"/>

This one DOES NOT work. It assumes the polygon I want is from the upper left to the upper right (wrapping around the other side of the map).
<nabble_img src="World_Map_-_UrtheCast.png" border="0" alt="Does not work"/>

I want results from the purple box, but it is returning results from the red box.

Has anyone ran into this issue? If so, how does one solve this? We have tried passing the points in a different order, but no matter what was tried, it always assumes the smallest polygon.

SIDE NOTE: When we use "envelope", it works fine, bit polygon support is needed.

Thanks!
Nate

Bump...

Anyone have any ideas? I'd be surprised if I was the only one who has come
across this. If you need more info, let me know.

Thanks!
Nate

On Thursday, August 29, 2013 4:07:04 PM UTC-7, nateweisiger wrote:

Hello,

We are running into an issue that I hope someone can help out with. Small
polygons (LESS than the length of 1/2 of the world from east to west) work
fine.

Once we increase the size of the polygon to a larger size (say, 2/3 the
size
of the globe east to west) the results are returned with the OPPOSITE
polygon. (Upper right becomes upper left, lower right becomes lower left).
I
understand why this is happening. Elasticsearch is talking 4 points, and
when wrapping the other way creates a smaller polygon than the one
intended,
it uses that one.

For example:
The following search works just fine
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/example1.png>

This one DOES NOT work. It assumes the polygon I want is from the upper
left
to the upper right (wrapping around the other side of the map).
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/World_Map_-_UrtheCast.png>

I want results from the purple box, but it is returning results from the
red
box.

Has anyone ran into this issue? If so, how does one solve this? We have
tried passing the points in a different order, but no matter what was
tried,
it always assumes the smallest polygon.

SIDE NOTE: When we use "envelope", it works fine, bit polygon support is
needed.

Thanks!
Nate

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/4-point-polygon-search-for-over-half-the-world-results-in-incorrect-opposite-polygon-to-be-searched-tp4040367.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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Nate,

thanks for posting this issue. Which version of ES are you using running
into this?

-- Florian

On Wednesday, September 4, 2013 2:02:04 AM UTC+2, nwei...@urthecast.com
wrote:

Bump...

Anyone have any ideas? I'd be surprised if I was the only one who has come
across this. If you need more info, let me know.

Thanks!
Nate

On Thursday, August 29, 2013 4:07:04 PM UTC-7, nateweisiger wrote:

Hello,

We are running into an issue that I hope someone can help out with. Small
polygons (LESS than the length of 1/2 of the world from east to west)
work
fine.

Once we increase the size of the polygon to a larger size (say, 2/3 the
size
of the globe east to west) the results are returned with the OPPOSITE
polygon. (Upper right becomes upper left, lower right becomes lower
left). I
understand why this is happening. Elasticsearch is talking 4 points, and
when wrapping the other way creates a smaller polygon than the one
intended,
it uses that one.

For example:
The following search works just fine
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/example1.png>

This one DOES NOT work. It assumes the polygon I want is from the upper
left
to the upper right (wrapping around the other side of the map).
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/World_Map_-_UrtheCast.png>

I want results from the purple box, but it is returning results from the
red
box.

Has anyone ran into this issue? If so, how does one solve this? We have
tried passing the points in a different order, but no matter what was
tried,
it always assumes the smallest polygon.

SIDE NOTE: When we use "envelope", it works fine, bit polygon support is
needed.

Thanks!
Nate

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/4-point-polygon-search-for-over-half-the-world-results-in-incorrect-opposite-polygon-to-be-searched-tp4040367.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.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Nate,

is it also possible to post an example of the failing query?

--Florian

On Wednesday, September 4, 2013 12:00:50 PM UTC+2, Florian Schilling wrote:

Hi Nate,

thanks for posting this issue. Which version of ES are you using running
into this?

-- Florian

On Wednesday, September 4, 2013 2:02:04 AM UTC+2, nwei...@urthecast.comwrote:

Bump...

Anyone have any ideas? I'd be surprised if I was the only one who has
come across this. If you need more info, let me know.

Thanks!
Nate

On Thursday, August 29, 2013 4:07:04 PM UTC-7, nateweisiger wrote:

Hello,

We are running into an issue that I hope someone can help out with.
Small
polygons (LESS than the length of 1/2 of the world from east to west)
work
fine.

Once we increase the size of the polygon to a larger size (say, 2/3 the
size
of the globe east to west) the results are returned with the OPPOSITE
polygon. (Upper right becomes upper left, lower right becomes lower
left). I
understand why this is happening. Elasticsearch is talking 4 points, and
when wrapping the other way creates a smaller polygon than the one
intended,
it uses that one.

For example:
The following search works just fine
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/example1.png>

This one DOES NOT work. It assumes the polygon I want is from the upper
left
to the upper right (wrapping around the other side of the map).
<
http://elasticsearch-users.115913.n3.nabble.com/file/n4040367/World_Map_-_UrtheCast.png>

I want results from the purple box, but it is returning results from the
red
box.

Has anyone ran into this issue? If so, how does one solve this? We have
tried passing the points in a different order, but no matter what was
tried,
it always assumes the smallest polygon.

SIDE NOTE: When we use "envelope", it works fine, bit polygon support is
needed.

Thanks!
Nate

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/4-point-polygon-search-for-over-half-the-world-results-in-incorrect-opposite-polygon-to-be-searched-tp4040367.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.
For more options, visit https://groups.google.com/groups/opt_out.