Search for phrase, even with missing letter

Hello!

I've researched a lot about this, but can't figure out a way to do that.

I'm searching for a way to match a phrase, even if the words are not in correct order and if some letter is missing in a word (a typo, for example).

This query should be performed in all documents, so, GET _http://localhost:9200/search would be OK.

Some examples below:

Keyword: Resaurant (missing the first "t" letter)

Should match:

  • Restaurant
  • Restaurante
  • Chinese Restaurant
  • The Restaurant of Tomorrow

The most equivalent entries will have better scores, of course.

Does anyone know who can I write down this query?

Thanks in advance!

I think you have two options:

Just found this one... another option using shingle token filter or word-ngram

https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-shingle-tokenfilter.html