I use svyLookup and I would like to sort the results using custom PostgreSQL functionality.
- Code: Select all
ORDER BY CASE WHEN dmetaphone(company_name) = dmetaphone(?) THEN levenshtein(company_name,?) ELSE 0 END,company_name
if the words are similar, I want to order by the levenshtein distance between the words.
Is there any way to use a custom sort like this with svyLookup?