"CloudSearchResults constructor not found" error when using Azure Search provider with SXA


Description

When using Azure search with SXA 1.9.0 — 9.3.0, search queries against Azure Search might fail with an error similar to the following:

Exception System.MissingMethodException: Constructor on type 'Sitecore.ContentSearch.Azure.Query.CloudSearchResults`1[[Sitecore.ContentSearch.SearchTypes.SearchResultItem, Sitecore.ContentSearch, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]]' not found.

For non-SXA sites, refer to "CloudSearchResults constructor not found" error in Azure Search.

Solution

To resolve the issue, consider one of the following options: