Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Don't use extended_bounds for time filter in date_histogram vis
Browse files Browse the repository at this point in the history
The date histogram vis currently uses extended_bounds on the date_histogram if a time filter is applied which means that these requests can't be cached since the cache key for the request cache for Elasticsearch is based on the request body. The `extended_bounds` here has no effect on the response of the date histogram aggregation because it also sets minDocCount to 0 so will not return any empty buckets.

This change removes the extended bounds parameter for the time filter so these requests can be cached by Elasticsearch.
  • Loading branch information
colings86 committed Mar 24, 2016
1 parent c649b49 commit e95e577
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/ui/public/agg_types/buckets/date_histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,6 @@ export default function DateHistogramAggType(timefilter, config, Private) {

return;
}

var bounds = timefilter.getActiveBounds();
if (bounds) {
output.params.extended_bounds = {
min: moment(bounds.min).valueOf(),
max: moment(bounds.max).valueOf()
};
}
}
}
]
Expand Down

0 comments on commit e95e577

Please sign in to comment.