So when using an aggregation on a field, it returns only the result of that field and the doc count of each. Could we show for each result, all the docs corresponding to it?
Example :
An aggregation term on an id, gets all the results grouped by id, I would like to get for each group, all the documents having their same rows combined. If there's for example a field number, then for each grouped same ids, the row number gets summed.
Elasticsearch doesn't "collapse" aggregation results. If you want to find the counts for aggs that all share the same set of fields, you'll need to construct a heirarchy of aggregations to represent that.
E.g. a terms -> terms -> histogram -> sum, or whatever is needed to express the set of fields
A related topic is field collapsing, but this only applies to search hits, not aggregation results.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.