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 geotile_grid aggregations #1349

Closed
owrcasstevens opened this issue Apr 24, 2020 · 2 comments · Fixed by #1350
Closed

Add support for geotile_grid aggregations #1349

owrcasstevens opened this issue Apr 24, 2020 · 2 comments · Fixed by #1350

Comments

@owrcasstevens
Copy link
Contributor

Currently using version 7.1 of elasticsearch-dsl, but geotile_grid aggregations do not seem to be supported. When I do:

grid_agg = search.aggs.bucket("grid", "geotile_grid", field="centroid", precision=2)

I am getting:

raise UnknownDslObject('DSL class `{}` does not exist in {}.'.format(name, cls._type_name))

Digging into the code a bit, it seems that the following aggs are supported:

filter
filters
children
parent
date_histogram
auto_date_histogram
date_range
geo_distance
geohash_grid
geo_centroid
global
histogram
ip_range
missing
nested
range
reverse_nested
significant_terms
significant_text
terms
sampler
diversified_sampler
composite
top_hits
avg
weighted_avg
cardinality
extended_stats
geo_bounds
max
min
percentiles
percentile_ranks
scripted_metric
stats
sum
value_count
avg_bucket
bucket_script
bucket_selector
cumulative_sum
derivative
extended_stats_bucket
max_bucket
min_bucket
moving_fn
moving_avg
percentiles_bucket
serial_diff
stats_bucket
sum_bucket
bucket_sort

But geotile_grid is not in there, which is surprising since Kibana switched to using geotile_grid aggs for maps:
elastic/kibana#30417

@owrcasstevens owrcasstevens changed the title Add support geotile_grid aggregation Add support for geotile_grid aggregations Apr 24, 2020
@sethmlarson
Copy link
Contributor

Agreed this would be great to add. My dev time is being spent elsewhere currently but eventually I'll get to this.

In the meantime if you're up to it I can review a submitted PR :)

@mbarretta
Copy link

mbarretta commented Apr 30, 2020

@owrcasstevens is the lower-level elasticsearch-py and option? I'm not a python guy, but it seems you could use the search method to form up the geotile_grid agg in json.

...and just noticed you already submitted a PR. Nevermind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants