Return Levenshtein distance in fuzzy query

Hy,

I want to return to closest phrase to a phrase stored in ElasticSearch, in
terms of Levenshtein distance. Both phrases can contain several words (up
to 100).

My query looks like:
{
"query": {
"bool":
{
must: [ {"fuzzy_like_this": {
"fields": [
"stand_for"
],
"like_text": queryPhrase,
"ignore_tf": true,
"fuzziness": 0.7,
}}
]
}
},
"min_score":2.0
};

and the mapping looks like:
{
"stand_for": {
"type": "string"
}

The problem is that the score returned is a relevance function of the terms
that match the fuziness parameter and I need to return only the score based
on Levenshtein distance. Is there any way to do this?

Thank you,

--
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/bca80d78-8146-4f2a-b4e3-4cef2b731929%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.