I'm trying to get the autocomplete suggestions working.
When I do a query from C# I do the following:
IClient client = Client.CreateFromConfig();
int nMaxResults = 5;
var searchResult = client.Search(Language.English)
.Select(x => new
Reference = x.Reference,
Date = x.Date,
Fields = x.Fields,
Title = x.Title.AsHighlighted(new HighlightSpec
PreTag = "",
PostTag = ""
Content = x.Content.AsHighlighted(
PreTag = "",
PostTag = ""
According to various bits of documentation, I'm supposed to add .Track() to the query but can't find it in the assemblies. I've added Episerver.Find and EpiServer.Framework using the instructions on here http://find.episerver.com/MyServices/Download
Where is the latest documentation on the C# API? It seems inconsistent/incorrect.
It should be in the EPiServer.Find.Framework assembly, in the EPiServer.Find.Framework.Statistics namespace.
I'm looking in packages\EPiServer.Find.22.214.171.12413\lib\net45\EPiServer.Find.dll installed by NuGet
That namespace doesn't exist. This is from http://nuget.episerver.com/feed/packages.svc/
You'll need to install the EPiSErver.Find.Framework package
I've installed EPiServer.Framework.9.7.2 and am still struggling to find the namespace.
Make sure you also have the "EPiServer.Find.Framework" - https://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Find.Framework
Apologies, I misread the namespace, it works now.
No problem. Glad it worked out!
Actually, I was a bit too premature, it compiled but doesn't run. It's missing a reference to
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in EPiServer.Find.Framework.dll
Additional information: Could not load file or assembly 'EPiServer.Find.Statistics, Version=126.96.36.19913, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The system cannot find the file specified.
I can't see anything likely in the nuget repo, can you advise
Ah. It's in the EPiServer.Find.Cms package: https://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Find.CMS
I've added that package now and when I run I get the error:
An exception of type 'StructureMap.StructureMapConfigurationException' occurred in StructureMap.dll but was not handled in user code
Additional information: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Find.Framework.Statistics.IStatisticTagsHelper'
Without the Track() call it works fine.
Any update on this?