3

What are the options for single word similarity check?

Consider the following case: we have documents where field email, is present. When new document is added we want to check if there are any documents where email is similar to the new one with some similarity constraint - for example 80% match.

Are there any specific built in queries which can be used?

1 Answers1

1

You can make use of Fuzzy Query, where you can provide your search string and Levenshtein distance in parameter fuzziness. Query reference here

Also to calculate Levenshtein distance from percentage, this might be helpful.

Alex Kartishev
  • 1,836
  • 3
  • 18
  • 25
  • The maximum allowed Levenshtein Edit Distance in elasticsearch is 2. Thus Fizzy Query won't work in current case. – user8763506 Oct 12 '17 at 07:58