Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master #6332

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 252 additions & 0 deletions bin/fixtures/agg_resp/date_histogram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
define(function () {
return {
'took': 35,
'timed_out': false,
'_shards': {
'total': 2,
'successful': 2,
'failed': 0
},
'hits': {
'total': 32899,
'max_score': 0,
'hits': []
},
'aggregations': {
'1': {
'buckets': [
{
'key_as_string': '2015-01-30T01:00:00.000Z',
'key': 1422579600000,
'doc_count': 18
},
{
'key_as_string': '2015-01-30T02:00:00.000Z',
'key': 1422583200000,
'doc_count': 68
},
{
'key_as_string': '2015-01-30T03:00:00.000Z',
'key': 1422586800000,
'doc_count': 146
},
{
'key_as_string': '2015-01-30T04:00:00.000Z',
'key': 1422590400000,
'doc_count': 149
},
{
'key_as_string': '2015-01-30T05:00:00.000Z',
'key': 1422594000000,
'doc_count': 363
},
{
'key_as_string': '2015-01-30T06:00:00.000Z',
'key': 1422597600000,
'doc_count': 555
},
{
'key_as_string': '2015-01-30T07:00:00.000Z',
'key': 1422601200000,
'doc_count': 878
},
{
'key_as_string': '2015-01-30T08:00:00.000Z',
'key': 1422604800000,
'doc_count': 1133
},
{
'key_as_string': '2015-01-30T09:00:00.000Z',
'key': 1422608400000,
'doc_count': 1438
},
{
'key_as_string': '2015-01-30T10:00:00.000Z',
'key': 1422612000000,
'doc_count': 1719
},
{
'key_as_string': '2015-01-30T11:00:00.000Z',
'key': 1422615600000,
'doc_count': 1813
},
{
'key_as_string': '2015-01-30T12:00:00.000Z',
'key': 1422619200000,
'doc_count': 1790
},
{
'key_as_string': '2015-01-30T13:00:00.000Z',
'key': 1422622800000,
'doc_count': 1582
},
{
'key_as_string': '2015-01-30T14:00:00.000Z',
'key': 1422626400000,
'doc_count': 1439
},
{
'key_as_string': '2015-01-30T15:00:00.000Z',
'key': 1422630000000,
'doc_count': 1154
},
{
'key_as_string': '2015-01-30T16:00:00.000Z',
'key': 1422633600000,
'doc_count': 847
},
{
'key_as_string': '2015-01-30T17:00:00.000Z',
'key': 1422637200000,
'doc_count': 588
},
{
'key_as_string': '2015-01-30T18:00:00.000Z',
'key': 1422640800000,
'doc_count': 374
},
{
'key_as_string': '2015-01-30T19:00:00.000Z',
'key': 1422644400000,
'doc_count': 152
},
{
'key_as_string': '2015-01-30T20:00:00.000Z',
'key': 1422648000000,
'doc_count': 140
},
{
'key_as_string': '2015-01-30T21:00:00.000Z',
'key': 1422651600000,
'doc_count': 73
},
{
'key_as_string': '2015-01-30T22:00:00.000Z',
'key': 1422655200000,
'doc_count': 28
},
{
'key_as_string': '2015-01-30T23:00:00.000Z',
'key': 1422658800000,
'doc_count': 9
},
{
'key_as_string': '2015-01-31T00:00:00.000Z',
'key': 1422662400000,
'doc_count': 29
},
{
'key_as_string': '2015-01-31T01:00:00.000Z',
'key': 1422666000000,
'doc_count': 38
},
{
'key_as_string': '2015-01-31T02:00:00.000Z',
'key': 1422669600000,
'doc_count': 70
},
{
'key_as_string': '2015-01-31T03:00:00.000Z',
'key': 1422673200000,
'doc_count': 136
},
{
'key_as_string': '2015-01-31T04:00:00.000Z',
'key': 1422676800000,
'doc_count': 173
},
{
'key_as_string': '2015-01-31T05:00:00.000Z',
'key': 1422680400000,
'doc_count': 370
},
{
'key_as_string': '2015-01-31T06:00:00.000Z',
'key': 1422684000000,
'doc_count': 545
},
{
'key_as_string': '2015-01-31T07:00:00.000Z',
'key': 1422687600000,
'doc_count': 845
},
{
'key_as_string': '2015-01-31T08:00:00.000Z',
'key': 1422691200000,
'doc_count': 1070
},
{
'key_as_string': '2015-01-31T09:00:00.000Z',
'key': 1422694800000,
'doc_count': 1419
},
{
'key_as_string': '2015-01-31T10:00:00.000Z',
'key': 1422698400000,
'doc_count': 1725
},
{
'key_as_string': '2015-01-31T11:00:00.000Z',
'key': 1422702000000,
'doc_count': 1801
},
{
'key_as_string': '2015-01-31T12:00:00.000Z',
'key': 1422705600000,
'doc_count': 1823
},
{
'key_as_string': '2015-01-31T13:00:00.000Z',
'key': 1422709200000,
'doc_count': 1657
},
{
'key_as_string': '2015-01-31T14:00:00.000Z',
'key': 1422712800000,
'doc_count': 1454
},
{
'key_as_string': '2015-01-31T15:00:00.000Z',
'key': 1422716400000,
'doc_count': 1131
},
{
'key_as_string': '2015-01-31T16:00:00.000Z',
'key': 1422720000000,
'doc_count': 810
},
{
'key_as_string': '2015-01-31T17:00:00.000Z',
'key': 1422723600000,
'doc_count': 583
},
{
'key_as_string': '2015-01-31T18:00:00.000Z',
'key': 1422727200000,
'doc_count': 384
},
{
'key_as_string': '2015-01-31T19:00:00.000Z',
'key': 1422730800000,
'doc_count': 165
},
{
'key_as_string': '2015-01-31T20:00:00.000Z',
'key': 1422734400000,
'doc_count': 135
},
{
'key_as_string': '2015-01-31T21:00:00.000Z',
'key': 1422738000000,
'doc_count': 72
},
{
'key_as_string': '2015-01-31T22:00:00.000Z',
'key': 1422741600000,
'doc_count': 8
}
]
}
}
};
});
83 changes: 83 additions & 0 deletions bin/fixtures/agg_resp/geohash_grid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
define(function (require) {
return function GeoHashGridAggResponseFixture() {

var _ = require('lodash');

// for vis:
//
// vis = new Vis(indexPattern, {
// type: 'tile_map',
// aggs:[
// { schema: 'metric', type: 'avg', params: { field: 'bytes' } },
// { schema: 'split', type: 'terms', params: { field: '@tags', size: 10 } },
// { schema: 'segment', type: 'geohash_grid', params: { field: 'geo.coordinates', precision: 3 } }
// ],
// params: {
// isDesaturated: true,
// mapType: 'Scaled%20Circle%20Markers'
// },
// });

var geoHashCharts = _.union(
_.range(48, 57), // 0-9
_.range(65, 90), // A-Z
_.range(97, 122) // a-z
);

var totalDocCount = 0;

var tags = _.times(_.random(4, 20), function (i) {
// random number of tags
var docCount = 0;
var buckets = _.times(_.random(40, 200), function () {
return _.sample(geoHashCharts, 3).join('');
})
.sort()
.map(function (geoHash) {
var count = _.random(1, 5000);

totalDocCount += count;
docCount += count;

return {
key: geoHash,
doc_count: count,
1: {
value: 2048 + i
}
};
});

return {
key: 'tag ' + (i + 1),
doc_count: docCount,
3: {
buckets: buckets
},
1: {
value: 1000 + i
}
};
});

return {
took: 3,
timed_out: false,
_shards: {
total: 4,
successful: 4,
failed: 0
},
hits: {
total: 298,
max_score: 0.0,
hits: []
},
aggregations: {
2: {
buckets: tags
}
}
};
};
});
37 changes: 37 additions & 0 deletions bin/fixtures/agg_resp/range.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
"took": 35,
"timed_out": false,
"_shards": {
"total": 7,
"successful": 7,
"failed": 0
},
"hits": {
"total": 218512,
"max_score": 0,
"hits": []
},
"aggregations": {
"1": {
"buckets": {
"*-1024.0": {
"to": 1024,
"to_as_string": "1024.0",
"doc_count": 20904
},
"1024.0-2560.0": {
"from": 1024,
"from_as_string": "1024.0",
"to": 2560,
"to_as_string": "2560.0",
"doc_count": 23358
},
"2560.0-*": {
"from": 2560,
"from_as_string": "2560.0",
"doc_count": 174250
}
}
}
}
};
Loading