I'm trying to make query sorted by elastic according to following priorities: firstly, it shows all results which are exact as search string. Then it show all results which have search string as the substring. And finally, it shows all fuzzy matches.
Example:
search: Infect
results:
infect (exact match)
infected people, infection is spreading, ... (substring)
impacted smth, I fetched ... (fuzzy match)