Hi There.
I have a parent child aggregation which counts child documents over a parent field where parents meet a certain criteria and children meet another criteria. I want these results sorted by matching children count.
I wanted to know what the performance implication would be of using this kind of sorting vs using default sorting.
Query structure is as follows:
parentFilter{
parentTerms{
terms {parent field}
childrenCount {
childrenFilter{}
}
}
}
And I order by "order" : {childrenCount>childrenFilter}