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

Boolean queries with indexed geoshapes break on Elastic Search 6.0 #28456

Closed
INRIX-Trang-Nguyen opened this issue Jan 31, 2018 · 5 comments · Fixed by #28458
Closed

Boolean queries with indexed geoshapes break on Elastic Search 6.0 #28456

INRIX-Trang-Nguyen opened this issue Jan 31, 2018 · 5 comments · Fixed by #28458
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug

Comments

@INRIX-Trang-Nguyen
Copy link

INRIX-Trang-Nguyen commented Jan 31, 2018

For repro steps, please see:

https://discuss.elastic.co/t/error-using-multiple-geospan-queries-as-bool-should-clauses/113945

The http 500 error occur sporadically under high concurrency (ES queries run as part of an EMR Spark job).

The same job without code changes run in ES 5.5 without issues.

@jkakavas jkakavas added the :Analytics/Geo Indexing, search aggregations of geo points and shapes label Jan 31, 2018
@jkakavas jkakavas assigned jkakavas and nknize and unassigned jkakavas Jan 31, 2018
@jkakavas
Copy link
Member

Hi @INRIX-Trang-Nguyen, thank you for your report. We would appreciate if you can format your issue according to the template and offer clear steps for reproduction, as this would allow us to better triage this and offer a solution if necessary.

jimczi added a commit to jimczi/elasticsearch that referenced this issue Jan 31, 2018
This change fixes a possible AIOOB during the parsing of the document that contains the indexed shape.
This change ensures that the parsing does not continue when the field that contains the shape has been found.

Closes elastic#28456
@jimczi jimczi added the >bug label Jan 31, 2018
@jimczi
Copy link
Contributor

jimczi commented Jan 31, 2018

This is a bug introduced in 6.0 that appears when more than one geo_shape query need to fetch pre-indexed shapes in an index. There is a race condition that can lead to an AIOOBE. I opened #28458 to fix it.

jimczi added a commit that referenced this issue Feb 1, 2018
This change fixes a possible AIOOB during the parsing of the document that contains the indexed shape.
This change ensures that the parsing does not continue when the field that contains the shape has been found.

Closes #28456
jimczi added a commit that referenced this issue Feb 1, 2018
This change fixes a possible AIOOB during the parsing of the document that contains the indexed shape.
This change ensures that the parsing does not continue when the field that contains the shape has been found.

Closes #28456
@INRIX-Trang-Nguyen
Copy link
Author

Awesome, thanks for the quick response and fix! Will this make it into ES 6.3?

@jimczi
Copy link
Contributor

jimczi commented Feb 1, 2018

Yes it will.

@florinvirdol
Copy link

florinvirdol commented Mar 3, 2021

Hi, guys!
What would be a good way to query points inside multiple pre-indexed shapes (eg.: querying for all points inside all shapes)?

Also, can you please advise what are the ways to get all points in shapes / shapes in shapes with Geo query geo_shape (multiple pre-indexed shape) on big geo-spatial data in ElasticSearch?

When you have some time, please, I put this question to StackOverflow and also to ElasticSearch discuss forum.

Thank you in advance!

cc: @jimczi @jkakavas @nknize @russcam @thomasneirynck

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants