aggregation

package
v1.0.0-beta5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPipelines

func ApplyPipelines(resp map[string]meta.AggregationResponse, aggs map[string]meta.Aggregations) error

ApplyPipelines evaluates the pipeline aggregations of aggs over the response tree rendered by Response. Pipeline aggregations do not see documents, they only read the values other aggregations already produced, so they run after the search instead of during collection.

Sibling pipelines (avg_bucket, sum_bucket, min_bucket, max_bucket, stats_bucket) are declared next to the multi bucket aggregation they read and add one value at that level. Parent pipelines (cumulative_sum, derivative, serial_diff, moving_fn, bucket_script, bucket_selector, bucket_sort) are declared inside a multi bucket aggregation and add one value per bucket, or drop and reorder the buckets.

func FilterPredicate

func FilterPredicate(name string, query interface{}, mappings *meta.Mappings) (*zedaggregation.FilterPredicate, error)

FilterPredicate compiles the query of a [filter] / [filters] / [nested] aggregation into a predicate over doc values.

Aggregation calculators only see a search.DocumentMatch, they cannot run a searcher, so only the query types that can be answered from doc values are supported: term, terms, match, range, exists, match_all, match_none and bool combinations of those. Everything else is rejected.

Deviations from elasticsearch: [match] is not analyzed, it compares the query string with the indexed doc values of the field, and [range] only supports numeric and date fields.

func Request

func Request(req zedaggregation.SearchAggregation, aggs map[string]meta.Aggregations, mappings *meta.Mappings) error

func Response

func Response(bucket *search.Bucket) (map[string]meta.AggregationResponse, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL