Collapse in In-group and out-of-group sorting problem

I want to group by a certain field, take only one of each group, and then sort by this document outside the group

I used collapse to group and deduplicate, but after deduplication, it is not the first result after sorting in inner_hits

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