Documentation
¶
Index ¶
- func ApplyPipelines(resp map[string]meta.AggregationResponse, aggs map[string]meta.Aggregations) error
- func FilterPredicate(name string, query interface{}, mappings *meta.Mappings) (*zedaggregation.FilterPredicate, error)
- func Request(req zedaggregation.SearchAggregation, aggs map[string]meta.Aggregations, ...) error
- func Response(bucket *search.Bucket) (map[string]meta.AggregationResponse, error)
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
Types ¶
This section is empty.