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

Exception when sorting on geo_point #1933

Closed
dadoonet opened this issue Nov 14, 2014 · 1 comment · Fixed by #1940
Closed

Exception when sorting on geo_point #1933

dadoonet opened this issue Nov 14, 2014 · 1 comment · Fixed by #1940
Assignees
Labels
bug Fixes for quality problems that affect the customer experience PR sent
Milestone

Comments

@dadoonet
Copy link
Member

By mistake, I clicked on the sort button on a geo_point column.

kibana 4 google chrome aujourd hui at 10 50 26

Which leads me to this error:

Segmented Fetch: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[ac-m7BnNQeSQSbe8OGl-vA][person][0]: SearchParseException[[person][0]: from[-1],size[500]: Parse Failure [Failed to parse source [{"size":500,"sort":{"address.location":"desc"},"aggs":{"agg_25":{"date_histogram":{"field":"dateOfBirth","interval":"31536000000ms","min_doc_count":0,"extended_bounds":{"min":"1939-12-31T23:00:00.000Z","max":"2010-12-31T23:00:00.000Z"}}}},"query":{"filtered":{"query":{"match_all":{}},"filter":{"bool":{"must":[{"range":{"dateOfBirth":{"gte":-946774800000,"lte":1293836400000}}}],"must_not":[]}}}}}]]]; nested: ElasticsearchIllegalArgumentException[can't sort on geo_point field without using specific sorting feature, like geo_distance]; }{[ac-m7BnNQeSQSbe8OGl-vA][person][1]: SearchParseException[[person][1]: from[-1],size[500]: Parse Failure [Failed to parse source [{"size":500,"sort":{"address.location":"desc"},"aggs":{"agg_25":{"date_histogram":{"field":"dateOfBirth","interval":"31536000000ms","min_doc_count":0,"extended_bounds":{"min":"1939-12-31T23:00:00.000Z","max":"2010-12-31T23:00:00.000Z"}}}},"query":{"filtered":{"query":{"match_all":{}},"filter":{"bool":{"must":[{"range":{"dateOfBirth":{"gte":-946774800000,"lte":1293836400000}}}],"must_not":[]}}}}}]]]; nested: ElasticsearchIllegalArgumentException[can't sort on geo_point field without using specific sorting feature, like geo_distance]; }{[ac-m7BnNQeSQSbe8OGl-vA][person][2]: SearchParseException[[person][2]: from[-1],size[500]: Parse Failure [Failed to parse source [{"size":500,"sort":{"address.location":"desc"},"aggs":{"agg_25":{"date_histogram":{"field":"dateOfBirth","interval":"31536000000ms","min_doc_count":0,"extended_bounds":{"min":"1939-12-31T23:00:00.000Z","max":"2010-12-31T23:00:00.000Z"}}}},"query":{"filtered":{"query":{"match_all":{}},"filter":{"bool":{"must":[{"range":{"dateOfBirth":{"gte":-946774800000,"lte":1293836400000}}}],"must_not":[]}}}}}]]]; nested: ElasticsearchIllegalArgumentException[can't sort on geo_point field without using specific sorting feature, like geo_distance]; }{[ac-m7BnNQeSQSbe8OGl-vA][person][3]: SearchParseException[[person][3]: from[-1],size[500]: Parse Failure [Failed to parse source [{"size":500,"sort":{"address.location":"desc"},"aggs":{"agg_25":{"date_histogram":{"field":"dateOfBirth","interval":"31536000000ms","min_doc_count":0,"extended_bounds":{"min":"1939-12-31T23:00:00.000Z","max":"2010-12-31T23:00:00.000Z"}}}},"query":{"filtered":{"query":{"match_all":{}},"filter":{"bool":{"must":[{"range":{"dateOfBirth":{"gte":-946774800000,"lte":1293836400000}}}],"must_not":[]}}}}}]]]; nested: ElasticsearchIllegalArgumentException[can't sort on geo_point field without using specific sorting feature, like geo_distance]; }{[ac-m7BnNQeSQSbe8OGl-vA][person][4]: SearchParseException[[person][4]: from[-1],size[500]: Parse Failure [Failed to parse source [{"size":500,"sort":{"address.location":"desc"},"aggs":{"agg_25":{"date_histogram":{"field":"dateOfBirth","interval":"31536000000ms","min_doc_count":0,"extended_bounds":{"min":"1939-12-31T23:00:00.000Z","max":"2010-12-31T23:00:00.000Z"}}}},"query":{"filtered":{"query":{"match_all":{}},"filter":{"bool":{"must":[{"range":{"dateOfBirth":{"gte":-946774800000,"lte":1293836400000}}}],"must_not":[]}}}}}]]]; nested: ElasticsearchIllegalArgumentException[can't sort on geo_point field without using specific sorting feature, like geo_distance]; }]

I think we should not allow sorting on such a column.

@lukasolson lukasolson added the bug Fixes for quality problems that affect the customer experience label Nov 14, 2014
@lukasolson lukasolson self-assigned this Nov 14, 2014
@dadoonet
Copy link
Member Author

I did not test it but I guess this could be applied to most of the "not known as sortable type" such as geo_shape, attachment and whatever type that could be provided as a plugin in elasticsearch.

So may be we should change the title for this issue and adapt the PR?

@rashidkpc rashidkpc added this to the 4.0.0-BETA3 milestone Nov 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience PR sent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants