0
votes

I'm trying to add multiple suggesters to an Azure Search index, but receive this error response:

An index cannot have more than one suggester with searchMode='analyzingInfixMatching'

The property on the index is called suggesters and is of type array. The documentation states:

The only mode currently supported is analyzingInfixMatching

Is the api defined to support future capabilities? Or am I overlooking an option that will enable me to add multiple suggesters?

And to understand why: I have fields in my index for different languages. I would like a suggester only to include the field for the language the current user has specified. With the current implementation I can only provide suggestions or autocomplete based on all available languages.

1

1 Answers

3
votes

I work on the Azure Cognitive Search team. As you guessed, the schema is designed to be adaptive to future changes but at the moment only one suggester is supported - analyzingFixMatching.

If I understand correctly, you want to apply suggestions selectively only on fields specified by user at query time. You can achieve that through searchFields property of suggestions API. Define a suggester with all the fields that can potentially be specified by users and then limit the required ones using the above property.

More details here - https://docs.microsoft.com/rest/api/searchservice/suggestions