// Copyright 2012-present Oliver Eilhard. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package es // Aggregations can be seen as a unit-of-work that build // analytic information over a set of documents. It is // (in many senses) the follow-up of facets in Elasticsearch. // For more details about aggregations, visit: // https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations.html type Aggregation interface { // Source returns a JSON-serializable aggregation that is a fragment // of the request sent to Elasticsearch. Source() (interface{}, error) }