Azure Search: Can suggester work based on contains rather than just typeahead?

Amrita Shukla 1 Reputation point
2021-11-15T17:11:35.94+00:00

Azure Search: Can suggester work based on contains rather than just typeahead?

For example: To get "Cognitive" in suggestions, if I type in "gnit" (contains/like) , it should work. Currently with default suggester and analyzingInfixMatching analyzer it works fine if enter "Cogn" i.e. typeahead.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
865 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,456 Reputation points
    2021-11-16T19:49:59.707+00:00

    Hi @Amrita Shukla ,

    Currently, you can not achieve this with the suggesters (or autocomplete) due to the way content is stored in the inverted index. You can perform a RegEx query to do a search for term like this but it is not recommended for typeahead since it requires a full scan of the index which would not make sense for typeahead.

    Can you please give more details about your project scenario so we can see if there are possible workarounds. For example, are you trying to search for something like abc in a code 123-abc-789 ?

    Thanks,
    Grace

    0 comments No comments