How can I write the below sort query in java -
"sort": [
{
"fieldName1": {
"order": "desc"
},
"fieldName2": {
"order": "desc"
}
}
]
I can do that if the query like -
"sort": [
{
"fieldName1": {
"order": "desc"
}
},
{
"fieldName2": {
"order": "desc"
}
}
]
but I need the first one.
So is there any way to do that, can anyone suggest please