Composite with max query in source

Hi all,

I am trying to get a max timestamp from a field inside an composite aggregation but I am unable to successfully do it.

I have tried this so far: https://gist.github.com/pjanzen/ce752ac4f4fcdea4db9d9946237ba098

Is what I want supported? Do I need a different approach?

Thanks for any insight.
Paul.

Hi,

Can you please send an example of documents and also the expected output from the search?