Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fuzzy Search in the Search API

The Azure search api offers a fuzzy paramter for suggestions. like this:

https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&fuzzy=true&search=berlen

Would return "Berlin" as a result of berlen.

I can't find a documentation about this how to activate it in a normal search setting there fuzzy = true seems to not change anything

https://blssuggestions.search.windows.net/indexes/cities/docs?api-version=2015-02-28&search=berlen&fuzzy=true
like image 908
Boas Enkler Avatar asked Mar 15 '23 12:03

Boas Enkler


2 Answers

[Update]: Please see the other responsed about using querytype=full as this response is no longer correct.

This is correct. Fuzzy search is only available currently in the suggestions api.

like image 149
Liam Cavanagh - MSFT Avatar answered Mar 20 '23 10:03

Liam Cavanagh - MSFT


You need to call:

https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&queryType=full&search=berlen~

You were missing querytype=full and the tilde after the character that you want to execute fuzzy searches on.

like image 44
lorengphd Avatar answered Mar 20 '23 12:03

lorengphd