Sort and Stats Aggregation

I have a mapping of type

    {
       "properties":{
          "Costs":{
             "type":"nested",
             "properties":{
                "price":{
                   "type":"integer"
                }
             }
          }
       }
    }

I want to find minimum of price in the Costs array of each document and then find min,max price of those minimums.
So basically kind of sort of minimums and then stats aggregation over those minimums.
Can this be done, let me know if any clarity is required

Can someone please help here.

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