Sorting by nested values in Javascript (Node.js)

I have a sort that works great in Kibana, but cannot seem to get it to work with the Node.js client. Can anyone tell me how I can convert this to something that node will understand?

    GET sev_incidents/_search
{
   "query" : {
      "term" : { "open" : true }
   },
   "sort" : [
       {
          "update.submission_timestamp" : {
             "mode" :  "max",
             "order" : "desc",
             "nested": {
                "path": "update"
             }
          }
       }
    ]
}

The api for search (what I am using this sort in) API Reference | Elasticsearch JavaScript Client [8.11] | Elastic
Lists "sort"' description as:

String, String, Boolean — A comma-separated list of : pairs

Any suggestions on how to transcribe this sort into something that fits that criteria would be much appreciated.

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