The parent/child of the join type sort by child field

Hello everyone
I'm not good at English.Please bear with some of my language errors.

I have an index based on the parent-child structure using the join type.

User can view the page based on the parent mode or the child mode.
And sort by any field.
if based parent, sort by child field, then sort by the maximum or minimum value among the children of the same parent.
if based child, sort by child field, then sort by each child field

like this:
parent mode sort by cdata, child1-2 have max cdata value, so parent1 is first

------------------------------------------------------------------------------—
                            childId1-1 cname cdata20...
parentId1 pname1 pdata....  childId1-2 cname cdata30...
                            childId1-3 cname cdata10...
------------------------------------------------------------------------------——
                            childId2-1 cname cdata20...
parentId2 pname2 pdata....  childId2-2 cname cdata25...
                            childId2-3 cname cdata10...
------------------------------------------------------------------------------——
.......

child mode sort by cdata, child1-2 have max cdata value, so child1-2 is first

------------------------------------------------------------------------------——
childId1-2 cname cdata30... pname1 pdata....
------------------------------------------------------------------------------——
childId2-2 cname cdata25... pname2 pdata....
------------------------------------------------------------------------------——
childId1-1 cname cdata20... pname1 pdata....
------------------------------------------------------------------------------——
childId2-1 cname cdata20... pname2 pdata....
------------------------------------------------------------------------------—
...........

So, I want to sort the parent documents based on the fields of their child documents in the parent-child structure built with the join type.

I found some related answers on Google, and it seems like it's not supported.
The reason for not supported seems to be related to performance issues of lucene.
However, the answers are quite old. I want to confirm if Elasticsearch version 8.x supports it in 2024.

Thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.