Episerver Upgrade – Search Breaking changes

I’ve had to recently upgrade an episerver website from 8.9 to 11 and stumbled on a few breaking changes which were pretty straight-forward to fix. However, the entire SearchService.cs class had a lot of errors after the upgrade and it no longer knows about the classes that belong to EPiServer.Search.Queries.

Turns out everything related to Episerver Search now belongs to a different assembly. You will now need to install the NuGet package: EPiServer.Search.CMS

Episerver Search CMS assembly

After installing the NuGet package, I also had to update the following lines in the SearchService.cs:

public virtual bool IsActive
{
   get { return ServiceLocator.Current.GetInstance().Active; }
}

and the following too:

private IQueryExpression CreateQuery(...)

That’s all I had to change to fix search-related breaking changes 🙂

Discover more from Nicola Ayan

Subscribe now to keep reading and get access to the full archive.

Continue reading