Hey Mahendra, welcome!
Might be helpful for you to share the search index definition so we can provide a bit more focused response… You can view or edit it in the Atlas UI → Search tab → Indexes → Edit JSON
You’ll probably want to append a $sort stage AFTER your $search stage… something like:
$search: {
index: "default",
text: {
query: "example",
path: "yourFieldName"
}
}
},
{
$sort: {
"yourFieldName": 1
}
}