forked from danpaz/bodybuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
83 lines (82 loc) · 3.21 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import avgAggregation from './avg-aggregation'
import cardinalityAggregation from './cardinality-aggregation'
import childrenAggregation from './children-aggregation'
import dateHistogramAggregation from './date-histogram-aggregation'
import extendedStatsAggregation from './extended-stats-aggregation'
import filterAggregation from './filter-aggregation'
import filtersAggregation from './filter-aggregation'
import geohashAggregation from './geohash-aggregation'
import globalAggregation from './global-aggregation'
import histogramAggregation from './histogram-aggregation'
import maxAggregation from './max-aggregation'
import minAggregation from './min-aggregation'
import missingAggregation from './missing-aggregation'
import nestedAggregation from './nested-aggregation'
import percentilesAggregation from './percentiles-aggregation'
import rangeAggregation from './range-aggregation'
import reverseNestedAggregation from './reverse-nested-aggregation'
import scriptedMetricAggregation from './scripted-metric-aggregation'
import significantTermsAggregation from './significant-terms-aggregation'
import statsAggregation from './stats-aggregation'
import sumAggregation from './sum-aggregation'
import termsAggregation from './terms-aggregation'
import topHitsAggregation from './top-hits-aggregation'
import valueCountAggregation from './value-count-aggregation'
/**
* Construct elasticsearch aggregations.
*
* @namespace Aggregations
*
* @example
* var body = new Bodybuilder()
* .aggregation('sum', 'grade')
* .build()
*/
export default {
average: avgAggregation,
avg: avgAggregation,
cardinality: cardinalityAggregation,
children: childrenAggregation,
datehistogram: dateHistogramAggregation,
date_histogram: dateHistogramAggregation,
'date-histogram': dateHistogramAggregation,
dateHistogram: dateHistogramAggregation,
extendedstats: extendedStatsAggregation,
extended_stats: extendedStatsAggregation,
'extended-stats': extendedStatsAggregation,
extendedStats: extendedStatsAggregation,
filter: filterAggregation,
filters: filtersAggregation,
geohash: geohashAggregation,
global: globalAggregation,
histogram: histogramAggregation,
max: maxAggregation,
min: minAggregation,
missing: missingAggregation,
nested: nestedAggregation,
percentiles: percentilesAggregation,
range: rangeAggregation,
reversenested: reverseNestedAggregation,
reverse_nested: reverseNestedAggregation,
'reverse-nested': reverseNestedAggregation,
reverseNested: reverseNestedAggregation,
scriptedmetric: scriptedMetricAggregation,
scripted_metric: scriptedMetricAggregation,
'scripted-metric': scriptedMetricAggregation,
scriptedMetric: scriptedMetricAggregation,
significantterms: significantTermsAggregation,
significant_terms: significantTermsAggregation,
'significant-terms': significantTermsAggregation,
significantTerms: significantTermsAggregation,
stats: statsAggregation,
sum: sumAggregation,
terms: termsAggregation,
tophits: topHitsAggregation,
top_hits: topHitsAggregation,
'top-hits': topHitsAggregation,
topHits: topHitsAggregation,
valuecount: valueCountAggregation,
value_count: valueCountAggregation,
'value-count': valueCountAggregation,
valueCount: valueCountAggregation
}