Browse Source

Add some more documentation

tags/v6.1.10
Oliver Eilhard 1 year ago
parent
commit
7f44f83b00

+ 3
- 1
search_aggs_pipeline_avg_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-avg-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-avg-bucket-aggregation.html
type AvgBucketAggregation struct {
format string
gapPolicy string
@@ -26,6 +26,7 @@ func NewAvgBucketAggregation() *AvgBucketAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *AvgBucketAggregation) Format(format string) *AvgBucketAggregation {
a.format = format
return a
@@ -62,6 +63,7 @@ func (a *AvgBucketAggregation) BucketsPath(bucketsPaths ...string) *AvgBucketAgg
return a
}

// Source returns the a JSON-serializable interface.
func (a *AvgBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_bucket_script.go View File

@@ -10,7 +10,7 @@ package elastic
// numeric and the script must return a numeric value.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-script-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-bucket-script-aggregation.html
type BucketScriptAggregation struct {
format string
gapPolicy string
@@ -27,6 +27,7 @@ func NewBucketScriptAggregation() *BucketScriptAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *BucketScriptAggregation) Format(format string) *BucketScriptAggregation {
a.format = format
return a
@@ -78,6 +79,7 @@ func (a *BucketScriptAggregation) AddBucketsPath(name, path string) *BucketScrip
return a
}

// Source returns the a JSON-serializable interface.
func (a *BucketScriptAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_bucket_selector.go View File

@@ -12,7 +12,7 @@ package elastic
// will be evaluated as false and all other values will evaluate to true.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-bucket-selector-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-bucket-selector-aggregation.html
type BucketSelectorAggregation struct {
format string
gapPolicy string
@@ -29,6 +29,7 @@ func NewBucketSelectorAggregation() *BucketSelectorAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *BucketSelectorAggregation) Format(format string) *BucketSelectorAggregation {
a.format = format
return a
@@ -80,6 +81,7 @@ func (a *BucketSelectorAggregation) AddBucketsPath(name, path string) *BucketSel
return a
}

// Source returns the a JSON-serializable interface.
func (a *BucketSelectorAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_cumulative_sum.go View File

@@ -10,7 +10,7 @@ package elastic
// histogram must have min_doc_count set to 0 (default for histogram aggregations).
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-cumulative-sum-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-cumulative-sum-aggregation.html
type CumulativeSumAggregation struct {
format string

@@ -25,6 +25,7 @@ func NewCumulativeSumAggregation() *CumulativeSumAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *CumulativeSumAggregation) Format(format string) *CumulativeSumAggregation {
a.format = format
return a
@@ -42,6 +43,7 @@ func (a *CumulativeSumAggregation) BucketsPath(bucketsPaths ...string) *Cumulati
return a
}

// Source returns the a JSON-serializable interface.
func (a *CumulativeSumAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_derivative.go View File

@@ -10,7 +10,7 @@ package elastic
// histogram must have min_doc_count set to 0 (default for histogram aggregations).
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-derivative-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-derivative-aggregation.html
type DerivativeAggregation struct {
format string
gapPolicy string
@@ -27,6 +27,7 @@ func NewDerivativeAggregation() *DerivativeAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *DerivativeAggregation) Format(format string) *DerivativeAggregation {
a.format = format
return a
@@ -70,6 +71,7 @@ func (a *DerivativeAggregation) BucketsPath(bucketsPaths ...string) *DerivativeA
return a
}

// Source returns the a JSON-serializable interface.
func (a *DerivativeAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_max_bucket.go View File

@@ -11,7 +11,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-max-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-max-bucket-aggregation.html
type MaxBucketAggregation struct {
format string
gapPolicy string
@@ -27,6 +27,7 @@ func NewMaxBucketAggregation() *MaxBucketAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *MaxBucketAggregation) Format(format string) *MaxBucketAggregation {
a.format = format
return a
@@ -63,6 +64,7 @@ func (a *MaxBucketAggregation) BucketsPath(bucketsPaths ...string) *MaxBucketAgg
return a
}

// Source returns the a JSON-serializable interface.
func (a *MaxBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_min_bucket.go View File

@@ -11,7 +11,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-min-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-min-bucket-aggregation.html
type MinBucketAggregation struct {
format string
gapPolicy string
@@ -27,6 +27,7 @@ func NewMinBucketAggregation() *MinBucketAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *MinBucketAggregation) Format(format string) *MinBucketAggregation {
a.format = format
return a
@@ -63,6 +64,7 @@ func (a *MinBucketAggregation) BucketsPath(bucketsPaths ...string) *MinBucketAgg
return a
}

// Source returns the a JSON-serializable interface.
func (a *MinBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_mov_avg.go View File

@@ -8,7 +8,7 @@ package elastic
// across the data and emit the average value of that window.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-movavg-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-movavg-aggregation.html
type MovAvgAggregation struct {
format string
gapPolicy string
@@ -28,6 +28,7 @@ func NewMovAvgAggregation() *MovAvgAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *MovAvgAggregation) Format(format string) *MovAvgAggregation {
a.format = format
return a
@@ -95,6 +96,7 @@ func (a *MovAvgAggregation) BucketsPath(bucketsPaths ...string) *MovAvgAggregati
return a
}

// Source returns the a JSON-serializable interface.
func (a *MovAvgAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 2
- 1
search_aggs_pipeline_percentiles_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-percentiles-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-percentiles-bucket-aggregation.html
type PercentilesBucketAggregation struct {
format string
gapPolicy string
@@ -68,6 +68,7 @@ func (p *PercentilesBucketAggregation) BucketsPath(bucketsPaths ...string) *Perc
return p
}

// Source returns the a JSON-serializable interface.
func (p *PercentilesBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_serial_diff.go View File

@@ -9,7 +9,7 @@ package elastic
// subtracted from itself at different time lags or periods.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-serialdiff-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-serialdiff-aggregation.html
type SerialDiffAggregation struct {
format string
gapPolicy string
@@ -26,6 +26,7 @@ func NewSerialDiffAggregation() *SerialDiffAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *SerialDiffAggregation) Format(format string) *SerialDiffAggregation {
a.format = format
return a
@@ -70,6 +71,7 @@ func (a *SerialDiffAggregation) BucketsPath(bucketsPaths ...string) *SerialDiffA
return a
}

// Source returns the a JSON-serializable interface.
func (a *SerialDiffAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_stats_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-stats-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-stats-bucket-aggregation.html
type StatsBucketAggregation struct {
format string
gapPolicy string
@@ -26,6 +26,7 @@ func NewStatsBucketAggregation() *StatsBucketAggregation {
}
}

// Format to use on the output of this aggregation.
func (s *StatsBucketAggregation) Format(format string) *StatsBucketAggregation {
s.format = format
return s
@@ -62,6 +63,7 @@ func (s *StatsBucketAggregation) BucketsPath(bucketsPaths ...string) *StatsBucke
return s
}

// Source returns the a JSON-serializable interface.
func (s *StatsBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

+ 3
- 1
search_aggs_pipeline_sum_bucket.go View File

@@ -10,7 +10,7 @@ package elastic
// be a multi-bucket aggregation.
//
// For more details, see
// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-sum-bucket-aggregation.html
// https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-aggregations-pipeline-sum-bucket-aggregation.html
type SumBucketAggregation struct {
format string
gapPolicy string
@@ -26,6 +26,7 @@ func NewSumBucketAggregation() *SumBucketAggregation {
}
}

// Format to use on the output of this aggregation.
func (a *SumBucketAggregation) Format(format string) *SumBucketAggregation {
a.format = format
return a
@@ -62,6 +63,7 @@ func (a *SumBucketAggregation) BucketsPath(bucketsPaths ...string) *SumBucketAgg
return a
}

// Source returns the a JSON-serializable interface.
func (a *SumBucketAggregation) Source() (interface{}, error) {
source := make(map[string]interface{})
params := make(map[string]interface{})

Loading…
Cancel
Save