+ Start a Discussion
sumedha psumedha p 

How to sort the results based on exact match from a SOSL query. In this example, I should see both the robert records on the top and the SOSL's fuzzy results in the bottom. What is the default order of SOSL results?

User-added image
Shravan Kumar 71Shravan Kumar 71
Hi Sumedha,

This post should clarify your doubt : https://salesforce.stackexchange.com/questions/154935/what-is-the-default-sort-order-for-records-in-sosl

Raj VakatiRaj Vakati
Try like below
FIND {raj} IN ALL FIELDS RETURNING Contact( FirstName,LastName Order By LastName )

sumedha psumedha p
Raj, I need the sorting to be done in a best match way not by first name or last name