Browse Source

Add some more documentation

Oliver Eilhard 1 year ago
parent
commit
7f44f83b00

+ 3
- 1
search_aggs_pipeline_avg_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // be a multi-bucket aggregation.
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-avg-bucket-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-avg-bucket-aggregation.html
14 14
 type AvgBucketAggregation struct {
15 15
 	format    string
16 16
 	gapPolicy string
@@ -26,6 +26,7 @@ func NewAvgBucketAggregation() *AvgBucketAggregation {
26 26
 	}
27 27
 }
28 28
 
29
+// Format to use on the output of this aggregation.
29 30
 func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation {
30 31
 	a.format = format
31 32
 	return a
@@ -62,6 +63,7 @@ func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAgg
62 63
 	return a
63 64
 }
64 65
 
66
+// Source returns the a JSON-serializable interface.
65 67
 func (a *AvgBucketAggregation) Source() (interface{}, error) {
66 68
 	source := make(map[string]interface{})
67 69
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_bucket_script.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // numeric and the script must return a numeric value.
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-script-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-bucket-script-aggregation.html
14 14
 type BucketScriptAggregation struct {
15 15
 	format    string
16 16
 	gapPolicy string
@@ -27,6 +27,7 @@ func NewBucketScriptAggregation() *BucketScriptAggregation {
27 27
 	}
28 28
 }
29 29
 
30
+// Format to use on the output of this aggregation.
30 31
 func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation {
31 32
 	a.format = format
32 33
 	return a
@@ -78,6 +79,7 @@ func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScrip
78 79
 	return a
79 80
 }
80 81
 
82
+// Source returns the a JSON-serializable interface.
81 83
 func (a *BucketScriptAggregation) Source() (interface{}, error) {
82 84
 	source := make(map[string]interface{})
83 85
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_bucket_selector.go View File

@@ -12,7 +12,7 @@ package elastic
12 12
 // will be evaluated as false and all other values will evaluate to true.
13 13
 //
14 14
 // For more details, see
15
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-selector-aggregation.html
15
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-bucket-selector-aggregation.html
16 16
 type BucketSelectorAggregation struct {
17 17
 	format    string
18 18
 	gapPolicy string
@@ -29,6 +29,7 @@ func NewBucketSelectorAggregation() *BucketSelectorAggregation {
29 29
 	}
30 30
 }
31 31
 
32
+// Format to use on the output of this aggregation.
32 33
 func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation {
33 34
 	a.format = format
34 35
 	return a
@@ -80,6 +81,7 @@ func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSel
80 81
 	return a
81 82
 }
82 83
 
84
+// Source returns the a JSON-serializable interface.
83 85
 func (a *BucketSelectorAggregation) Source() (interface{}, error) {
84 86
 	source := make(map[string]interface{})
85 87
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_cumulative_sum.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // histogram must have min_doc_count set to 0 (default for histogram aggregations).
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-cumulative-sum-aggregation.html
14 14
 type CumulativeSumAggregation struct {
15 15
 	format string
16 16
 
@@ -25,6 +25,7 @@ func NewCumulativeSumAggregation() *CumulativeSumAggregation {
25 25
 	}
26 26
 }
27 27
 
28
+// Format to use on the output of this aggregation.
28 29
 func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation {
29 30
 	a.format = format
30 31
 	return a
@@ -42,6 +43,7 @@ func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *Cumulati
42 43
 	return a
43 44
 }
44 45
 
46
+// Source returns the a JSON-serializable interface.
45 47
 func (a *CumulativeSumAggregation) Source() (interface{}, error) {
46 48
 	source := make(map[string]interface{})
47 49
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_derivative.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // histogram must have min_doc_count set to 0 (default for histogram aggregations).
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-derivative-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-derivative-aggregation.html
14 14
 type DerivativeAggregation struct {
15 15
 	format    string
16 16
 	gapPolicy string
@@ -27,6 +27,7 @@ func NewDerivativeAggregation() *DerivativeAggregation {
27 27
 	}
28 28
 }
29 29
 
30
+// Format to use on the output of this aggregation.
30 31
 func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation {
31 32
 	a.format = format
32 33
 	return a
@@ -70,6 +71,7 @@ func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeA
70 71
 	return a
71 72
 }
72 73
 
74
+// Source returns the a JSON-serializable interface.
73 75
 func (a *DerivativeAggregation) Source() (interface{}, error) {
74 76
 	source := make(map[string]interface{})
75 77
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_max_bucket.go View File

@@ -11,7 +11,7 @@ package elastic
11 11
 // be a multi-bucket aggregation.
12 12
 //
13 13
 // For more details, see
14
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-max-bucket-aggregation.html
14
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-max-bucket-aggregation.html
15 15
 type MaxBucketAggregation struct {
16 16
 	format    string
17 17
 	gapPolicy string
@@ -27,6 +27,7 @@ func NewMaxBucketAggregation() *MaxBucketAggregation {
27 27
 	}
28 28
 }
29 29
 
30
+// Format to use on the output of this aggregation.
30 31
 func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation {
31 32
 	a.format = format
32 33
 	return a
@@ -63,6 +64,7 @@ func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAgg
63 64
 	return a
64 65
 }
65 66
 
67
+// Source returns the a JSON-serializable interface.
66 68
 func (a *MaxBucketAggregation) Source() (interface{}, error) {
67 69
 	source := make(map[string]interface{})
68 70
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_min_bucket.go View File

@@ -11,7 +11,7 @@ package elastic
11 11
 // be a multi-bucket aggregation.
12 12
 //
13 13
 // For more details, see
14
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-min-bucket-aggregation.html
14
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-min-bucket-aggregation.html
15 15
 type MinBucketAggregation struct {
16 16
 	format    string
17 17
 	gapPolicy string
@@ -27,6 +27,7 @@ func NewMinBucketAggregation() *MinBucketAggregation {
27 27
 	}
28 28
 }
29 29
 
30
+// Format to use on the output of this aggregation.
30 31
 func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation {
31 32
 	a.format = format
32 33
 	return a
@@ -63,6 +64,7 @@ func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAgg
63 64
 	return a
64 65
 }
65 66
 
67
+// Source returns the a JSON-serializable interface.
66 68
 func (a *MinBucketAggregation) Source() (interface{}, error) {
67 69
 	source := make(map[string]interface{})
68 70
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_mov_avg.go View File

@@ -8,7 +8,7 @@ package elastic
8 8
 // across the data and emit the average value of that window.
9 9
 //
10 10
 // For more details, see
11
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html
11
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-movavg-aggregation.html
12 12
 type MovAvgAggregation struct {
13 13
 	format    string
14 14
 	gapPolicy string
@@ -28,6 +28,7 @@ func NewMovAvgAggregation() *MovAvgAggregation {
28 28
 	}
29 29
 }
30 30
 
31
+// Format to use on the output of this aggregation.
31 32
 func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation {
32 33
 	a.format = format
33 34
 	return a
@@ -95,6 +96,7 @@ func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregati
95 96
 	return a
96 97
 }
97 98
 
99
+// Source returns the a JSON-serializable interface.
98 100
 func (a *MovAvgAggregation) Source() (interface{}, error) {
99 101
 	source := make(map[string]interface{})
100 102
 	params := make(map[string]interface{})

+ 2
- 1
search_aggs_pipeline_percentiles_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // be a multi-bucket aggregation.
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-percentiles-bucket-aggregation.html
14 14
 type PercentilesBucketAggregation struct {
15 15
 	format       string
16 16
 	gapPolicy    string
@@ -68,6 +68,7 @@ func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *Perc
68 68
 	return p
69 69
 }
70 70
 
71
+// Source returns the a JSON-serializable interface.
71 72
 func (p *PercentilesBucketAggregation) Source() (interface{}, error) {
72 73
 	source := make(map[string]interface{})
73 74
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_serial_diff.go View File

@@ -9,7 +9,7 @@ package elastic
9 9
 // subtracted from itself at different time lags or periods.
10 10
 //
11 11
 // For more details, see
12
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-serialdiff-aggregation.html
12
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-serialdiff-aggregation.html
13 13
 type SerialDiffAggregation struct {
14 14
 	format    string
15 15
 	gapPolicy string
@@ -26,6 +26,7 @@ func NewSerialDiffAggregation() *SerialDiffAggregation {
26 26
 	}
27 27
 }
28 28
 
29
+// Format to use on the output of this aggregation.
29 30
 func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation {
30 31
 	a.format = format
31 32
 	return a
@@ -70,6 +71,7 @@ func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffA
70 71
 	return a
71 72
 }
72 73
 
74
+// Source returns the a JSON-serializable interface.
73 75
 func (a *SerialDiffAggregation) Source() (interface{}, error) {
74 76
 	source := make(map[string]interface{})
75 77
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_stats_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // be a multi-bucket aggregation.
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-stats-bucket-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-stats-bucket-aggregation.html
14 14
 type StatsBucketAggregation struct {
15 15
 	format    string
16 16
 	gapPolicy string
@@ -26,6 +26,7 @@ func NewStatsBucketAggregation() *StatsBucketAggregation {
26 26
 	}
27 27
 }
28 28
 
29
+// Format to use on the output of this aggregation.
29 30
 func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation {
30 31
 	s.format = format
31 32
 	return s
@@ -62,6 +63,7 @@ func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucke
62 63
 	return s
63 64
 }
64 65
 
66
+// Source returns the a JSON-serializable interface.
65 67
 func (s *StatsBucketAggregation) Source() (interface{}, error) {
66 68
 	source := make(map[string]interface{})
67 69
 	params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_sum_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
10 10
 // be a multi-bucket aggregation.
11 11
 //
12 12
 // For more details, see
13
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-sum-bucket-aggregation.html
13
+// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-sum-bucket-aggregation.html
14 14
 type SumBucketAggregation struct {
15 15
 	format    string
16 16
 	gapPolicy string
@@ -26,6 +26,7 @@ func NewSumBucketAggregation() *SumBucketAggregation {
26 26
 	}
27 27
 }
28 28
 
29
+// Format to use on the output of this aggregation.
29 30
 func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation {
30 31
 	a.format = format
31 32
 	return a
@@ -62,6 +63,7 @@ func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAgg
62 63
 	return a
63 64
 }
64 65
 
66
+// Source returns the a JSON-serializable interface.
65 67
 func (a *SumBucketAggregation) Source() (interface{}, error) {
66 68
 	source := make(map[string]interface{})
67 69
 	params := make(map[string]interface{})

Loading…
Cancel
Save