leen3o leen3o - 3 months ago 18
C# Question

Azure Search API C# Fuzzy / Misspellings Not Working As Expected

I have an index set up with about 1000 items in it. I am doing the following API call to get the results back.

var parameters = new SearchParameters
{
Select = new[] { "pageTitle", "pageUrl", "metaDescription" },
Top = 5,
QueryType = QueryType.Full
};
var results = indexer.Documents.Search<IndexPageData>("childrens bed frames~", parameters);


It's working as expected from a getting data back point of view. But if I misspell 'Childrens' with something like 'Childrns' or 'Chidrens'... Was I under the impression the fuzzy/mis-spellings search would understand and return the same results or very similar?

But I get completely different results and they are very poorly matched compared to the correctly spelled term.

Am I missing something with the API?

Answer Source

As per the comment from Aaron. I was missing the tilda at the end of each word

childrens~ bed~ frames~

This is now catching things like "childrn bed frames" etc...