'Azure search autocomplete partial terms and fuzzy search
I am using the autocomplete feature via the latest SDK version.
I want to enable auto complete for partial terms:
icro -> "microsoft"
bunt -> "ubuntu"
etc.
I tried adding "~" or "*" to the search term but don't get any results.
I could not find any ref in the ACS docs.
Is there a way to support this with the autocomplete API?
Also, using the fuzzy option does not work at all with autocomplete.
I tried "nicro" search term and expect to get "microsoft". (With or without "~" as postfix)
I also tried "nicrosoft" and did not get anything. (With or without "~" as postfix)
When just using any prefix of "microsoft" I am getting results as expected.
Solution 1:[1]
Matches work on the beginning of a term in the input string.
Autocomplete and suggestions will match on partial versions that start with the word you're typing, such as "mic" would return "microsoft" if you have a Suggester configured for the field, but not on partial infix terms like "icro".
Supported configurations for Autocomplete are listed here: https://docs.microsoft.com//azure/search/search-add-autocomplete-suggestions
The default language analyzer is Standard Lucene and since Fuzzy Search, you may think considering a different language analyzer: https://docs.microsoft.com/azure/search/search-query-fuzzy#indexing-for-fuzzy-search. Verbatim: " However, if test queries are not producing the matches you expect, you could try varying the indexing analyzer, setting it to a language analyzer, to see if you get better results. Some languages, particularly those with vowel mutations, can benefit from the inflection and irregular word forms generated by the Microsoft natural language processors. In some cases, using the right language analyzer can make a difference in whether a term is tokenized in a way that is compatible with the value provided by the user"
Also, please have in consideration that language analyzers may not have company /product words (such as Microsoft, Ubuntu, etc.), so if they are not in the language lexicon, fuzzy search won't be returning any results.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gia Mondragon - MSFT |
