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


Description

An error similar to the following might occur when querying SXA search indexes and using the Azure Search provider:

MissingMethodException: Constructor on type 'Sitecore.XA.Foundation.Search.Providers.Azure.LinqToCloudIndex`1[[Sitecore.ContentSearch.SearchTypes.SearchResultItem, Sitecore.ContentSearch, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null]]' not found.]

Note: This issue affects SXA 1.8.1 - 1.9.0 versions.

Solution

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