Przeglądaj źródła

change(elasticsearch): changed min_doc_count to zero in query to get buckets for missing values, fixes #3131

Torkel Ödegaard 10 lat temu
rodzic
commit
dbe35bfed1

+ 1 - 1
public/app/plugins/datasource/elasticsearch/query_builder.js

@@ -126,7 +126,7 @@ function (angular) {
           esAgg["date_histogram"] = {
           esAgg["date_histogram"] = {
             "interval": this.getInterval(aggDef),
             "interval": this.getInterval(aggDef),
             "field": this.timeField,
             "field": this.timeField,
-            "min_doc_count": 1,
+            "min_doc_count": 0,
             "extended_bounds": { "min": "$timeFrom", "max": "$timeTo" }
             "extended_bounds": { "min": "$timeFrom", "max": "$timeTo" }
           };
           };
           break;
           break;