Use Levenshtein distance in query

Enonic version: 7.2.0
OS: Linux Mint 19.3

Is possible use the Levenshtein distance with the expression into double quotes?

For example, these two queries returns different results:

fulltext('_allText', 'utprøvence~2', 'OR') => Return 95 results
fulltext('_allText', '"utprøvence"~2', 'OR') => No results

I need use double quotes, because I have expressions that have more than 1 word.

Maybe it is related to this one?

Maybe. But this topic is related to the double quotes. Without double quotes, the “Levenshtein distance” works correctly.

I tried fulltext('_allText', '"utprøvence"~2', 'OR') in Data Toolbox and got same results s for fulltext('_allText', 'utprøvence~2', 'OR'), although it was only one item called utprøvence in the data.
So, I currently can’t reproduce the behavior you describe.

Another question about this.
The Levenshtein distance consider the character space to return the results of query?
For example, the query

fulltext('_allText', 'myword~1', 'OR')

return the results with word my word?

Due to tokeization which uses space as a delimeter it won’t work.
I suspect you are tying to solve compound words in Norwegian language. Enonic XP uses Elasticsearch which does not provide this functionality out of the box.

Does the levenshtein distance not allow the misspelling of a spesific word by one character?
fulltext(‘displayName’, ‘tannhelsetjeneser~1’)

should this not equal?
fulltext(‘displayName’, ‘tannhelsetjenester’)

and return the same amount of results?

The levenshtein Query should pot. return more hits than the exact one

levenshtein Query is returning less hits in this case. (92 hits) (197 hits)

fulltext(‘displayName’, ‘tannhelsetjeneser~1’)

You are also using fewer characters, not just misspelling. The levenshtein algorithm is handled by Elasticsearch, so you could always check out what they say about it?

Could this also occur because the fuzzy in word tannhelsetjenester consider the character space between characters too?

I only get 92 results if I add an extra character. (ref You are also using fewer characters, not just misspelling.)