@@ -31,21 +31,29 @@ The correlation function to execute.
31
31
The configuration to calculate a count correlation. This function is designed for
32
32
determining the correlation of a term value and a given metric. Consequently, it
33
33
needs to meet the following requirements.
34
+ +
35
+ --
34
36
35
37
* The `buckets_path` must point to a `_count` metric.
36
38
* The total count of all the `bucket_path` count values must be less than or equal to `indicator.doc_count`.
37
39
* When utilizing this function, an initial calculation to gather the required `indicator` values is required.
38
-
40
+ --
41
+ +
39
42
.Properties of `count_correlation`
40
43
[%collapsible%open]
41
44
=====
42
45
`indicator`:::
43
46
(Required, object)
44
47
The indicator with which to correlate the configured `bucket_path` values.
45
-
48
+ +
46
49
.Properties of `indicator`
47
50
[%collapsible%open]
48
- =====
51
+ ======
52
+ `doc_count`:::
53
+ (Required, integer)
54
+ The total number of documents that initially created the `expectations`. It's required to be greater than or equal to the sum
55
+ of all values in the `buckets_path` as this is the originating superset of data to which the term values are correlated.
56
+
49
57
`expectations`:::
50
58
(Required, array)
51
59
An array of numbers with which to correlate the configured `bucket_path` values. The length of this value must always equal
@@ -55,12 +63,7 @@ the number of buckets returned by the `bucket_path`.
55
63
(Optional, array)
56
64
An array of fractions to use when averaging and calculating variance. This should be used if the pre-calculated data and the
57
65
`buckets_path` have known gaps. The length of `fractions`, if provided, must equal `expectations`.
58
-
59
- `doc_count`:::
60
- (Required, integer)
61
- The total number of documents that initially created the `expectations`. It's required to be greater than or equal to the sum
62
- of all values in the `buckets_path` as this is the originating superset of data to which the term values are correlated.
63
- =====
66
+ ======
64
67
=====
65
68
====
66
69
@@ -75,8 +78,10 @@ A `bucket_correlation` aggregation looks like this in isolation:
75
78
"buckets_path": "range_values>_count", <1>
76
79
"function": {
77
80
"count_correlation": { <2>
78
- "expectations": [...],
79
- "doc_count": 10000
81
+ "indicator": {
82
+ "expectations": [...],
83
+ "doc_count": 10000
84
+ }
80
85
}
81
86
}
82
87
}
0 commit comments