ElasticSearch first/last name match

elasticsearch, fuzzy-search

Solution

It sounds like you're looking for Phonetic Analysis, which can be used to create new tokens that represent what the original tokens sounds like.

I created a runnable example with your example data here, which shows a search for "Dan Smi" matching the first and last name fields using a double metaphone filter.

The github page of the Phonetic Analysis plugin contains the name of all the other implemented phonetic token filters that you might want to try out as well.

Problem

I have two fields: `first` and `last` I'm trying to use `multi_match` to fuzzy match full names: ``` "multi_match": { "query": name, "fields": [ "first", "last", ], "fuzziness": 0.1 } ``` This search only matches when the search is 100% exact `first +' '+ last name`. This is undesirable. What would be a more effective first-last name search technique with ElasticSearch? (assume the two fields must be separate) e.g. typing `Dan Smi` should match `Danny Smith`

Original source