Skip to content

Commit 4fca38c

Browse files
author
Sean Sullivan
committed
Ensure global doc count isn't set to 0
1 parent c49dba0 commit 4fca38c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elastic_datashader/tilegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ def generate_tile(idx, x, y, z, headers, params, tile_width_px=256, tile_height_
11111111
geo_tile_grid = A("geotile_grid", field=geopoint_field, precision=geotile_precision, size=max_bins)
11121112

11131113
if params['bucket_min']>0 or params['bucket_max']<1:
1114-
if global_doc_cnt is None:
1114+
if global_doc_cnt is None or global_doc_cnt == 0:
11151115
# this isn't good we need a real number so lets query the max aggregation ammount
11161116
max_value_s = copy.copy(base_s)
11171117
bucket = max_value_s.aggs.bucket("comp", "geotile_grid", field=geopoint_field, precision=geotile_precision, size=1)

0 commit comments

Comments
 (0)