In the next query I want to enhance performance because here elastic need to aggregate all previous bucket and sort it then give the result does any one can help?
{"aggs":{"Edition":{"aggs":{"MinAggregation":{"min":{"field":"date"}},"commits_bucket_sort":{"bucket_sort":{"from":468,"size":12}},"Pages":{"aggs":{"top_hits":{"top_hits":{"size":1,"_source":{"includes":["title"]}}}},"terms":{"field":"dummyAggField1","size":24}},"CardinalityAggregation":{"cardinality":{"field":"dummyAggField1"}}},"terms":{"field":"dummyAggField","order":[{"MinAggregation":"asc"}],"size":390}},"CardinalityAggregation":{"cardinality":{"field":"dummyAggField"}}},"size":0}
I try to know other way to build the query or how to enhance it