Merge pull request #7126 from ycombinator/gh-6338
Specifying date format when filtering a date histogram
This commit is contained in:
commit
6d543b48d6
|
@ -75,6 +75,9 @@ describe('AggConfig Filters', function () {
|
|||
expect(fieldParams).to.have.property('lte');
|
||||
expect(fieldParams.lte).to.be.a('number');
|
||||
|
||||
expect(fieldParams).to.have.property('format');
|
||||
expect(fieldParams.format).to.be('epoch_millis');
|
||||
|
||||
expect(fieldParams.gte).to.be.lessThan(fieldParams.lte);
|
||||
|
||||
expect(filter).to.have.property('meta');
|
||||
|
|
|
@ -8,7 +8,8 @@ export default function createDateHistogramFilterProvider(Private) {
|
|||
|
||||
return buildRangeFilter(agg.params.field, {
|
||||
gte: start.valueOf(),
|
||||
lte: start.add(interval).subtract(1, 'ms').valueOf()
|
||||
lte: start.add(interval).subtract(1, 'ms').valueOf(),
|
||||
format: 'epoch_millis'
|
||||
}, agg.vis.indexPattern);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue