I am in process of upgrading Sitecore from 8.2 to 10 and also Solr.
SolrSearchWithSpatialContext was implemented by previous team but looks like this code is outdated now and there has been no update.
Basically this class is inherited from SolrSearchContext
.
public SolrSearchWithSpatialContext(SolrSearchIndex index,
SearchSecurityOptions options = SearchSecurityOptions.EnableSecurityCheck)
: base(index, index.Locator.GetInstance<ILinqToIndexFactory>() , options)
{
Assert.ArgumentNotNull(index, "index");
Assert.ArgumentNotNull(options, "options");
_contentSearchSettings = index.Locator.GetInstance<IContentSearchConfigurationSettings>();
}
In the new version, an additional parameter,ILinqToIndexFactory
,has been introduced for instantiating SolrSearchContext
I am not able to figure out how to resolve this parameter. I tried few different things but no success and there is hardly any documentation available around this.
I tried passing index.Locator.GetInstance<ILinqToIndexFactory>()
but then it throws exception saying Service Sitecore.ContentSearch.Abstractions.Factories.ILinqToIndexFactory was not registered in container
Please if anyone can help. Thanks in advance.