YodasMyDad
YodasMyDad

Reputation: 9475

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?

Upvotes: 1

Views: 1489

Answers (2)

YodasMyDad
YodasMyDad

Reputation: 9475

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...

Upvotes: 3

K Sant
K Sant

Reputation: 9

"Fuzzy" Search is currently only available for the suggester, see this. You will have to rely on your language analyser to properly tokenize the word and provide you with the expected result.

Upvotes: 0

Related Questions