Hello. I have several fields, and I want to put each one as a sub agg of another one.
Say A->subAgg(B)->subAgg(C)->subAgg(D)
But I want them to be put depending on their number of results. If for example D has the most results as an aggregation I want it to be put at first, and the next one is the one containing the second most results, say A... etc like so D->subAgg(A)->subAgg(B)->subAgg(C)
Afraid that isn't possible. Order of the aggregation in the tree determines which and how documents match the child sub-aggregations. We can't reorder the aggs predominantly for technical reasons, but also because it would break the counts and metrics. The generated counts/metrics are only valid in the order specified.
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.