Skip to content

Commit

Permalink
create es dsl builder class for geotile_grid, re #11628
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Nov 18, 2024
1 parent af6bc7a commit 54eb9b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arches/app/search/elasticsearch_dsl_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,18 @@ def __init__(self, **kwargs):
self.agg[self.name][self.type]["precision"] = self.precision


class GeoTileGridAgg(Aggregation):
"""
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geotilegrid-aggregation.html
"""

def __init__(self, **kwargs):
self.precision = kwargs.get("precision", 5)
super(GeoTileGridAgg, self).__init__(type="geotile_grid", **kwargs)
self.agg[self.name][self.type]["precision"] = self.precision


class GeoBoundsAgg(Aggregation):
"""
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html
Expand Down

0 comments on commit 54eb9b4

Please sign in to comment.