How to sort fuzzy result by Levenshtein distance?

I want that in the search results exact matches had more weight.

Example:
dest
test
tesd
desd

I want to see such a result by "query" = test
test (Levenshtein distance = 0)
dest (Levenshtein distance = 1)
tesd (Levenshtein distance = 1)
desd (Levenshtein distance = 2)

But a see:
dest
desd
test
tesd

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/29655425-c6f1-44a4-b6eb-9520bcc2c208%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.