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

Add support for geo_point in top_metrics aggregation #87080

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

iverase
Copy link
Contributor

@iverase iverase commented May 24, 2022

This PR adds the possibility of adding fields of type geo_point as a metric in the top_metrics aggregation. /It currently just output the first point in case of an array of points with the format "lat, lon".

@iverase iverase added the :Analytics/Aggregations Aggregations label May 24, 2022
@iverase iverase requested a review from nik9000 May 24, 2022 14:56
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 24, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@iverase iverase marked this pull request as draft May 24, 2022 14:56
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's how to do it, yeah.

I do think our lack of support for fetching all of the values of a field is a problem - there's an issue for it that came up many months after we wrote the feature. And I imagine it's a bigger problem with geo because arrays of points is not uncommon.

@iverase
Copy link
Contributor Author

iverase commented Jun 1, 2022

And I imagine it's a bigger problem with geo because arrays of points is not uncommon.

I don't think so as when I see points as metrics I imagine more a device reporting its position so in general point metrics should be single valued.

At the moment the biggest issue (and it is not specific to this aggregation) is the format of geo_point doc values. They come as a string"lat, lon" which is totally different to the formats supported for the fields API.

@nik9000
Copy link
Member

nik9000 commented Jun 1, 2022

At the moment the biggest issue (and it is not specific to this aggregation) is the format of geo_point doc values. They come as a string"lat, lon" which is totally different to the formats supported for the fields API.

Ah! When I implements terms for _tsid I had it come out as a map which felt natural but required a bit of special casing, sadly. I think it's worth a more general clean up.

@elasticsearchmachine elasticsearchmachine changed the base branch from master to main July 22, 2022 23:07
@mark-vieira mark-vieira added v8.5.0 and removed v8.4.0 labels Jul 27, 2022
@csoulios csoulios added v8.6.0 and removed v8.5.0 labels Sep 21, 2022
@kingherc kingherc added v8.7.0 and removed v8.6.0 labels Nov 16, 2022
@rjernst rjernst added v8.8.0 and removed v8.7.0 labels Feb 8, 2023
@gmarouli gmarouli added v8.9.0 and removed v8.8.0 labels Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet