0
votes

I'm using terms aggregation with minimum document count.

I would like to run another terms aggregation on the documents related to the former one.

In other words I would like to run a terms aggregation only on documents that is part of groups that bigger than 10.

Anyway to do this with elastic?

1

1 Answers

0
votes

Yes, what you want is called Sub Aggregations.

From that page's documentation:

Bucketing aggregations can have sub-aggregations (bucketing or metric). The sub-aggregations will be computed for the buckets which their parent aggregation generates. There is no hard limit on the level/depth of nested aggregations (one can nest an aggregation under a "parent" aggregation, which is itself a sub-aggregation of another higher-level aggregation).