November Happy Hour will be moved to Thursday December 5th.

Tracking

Vote:
 

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)
                            .For("banana")
                            .Take(nMaxResults)
                            .Select(x => new
                            {
                                Reference = x.Reference,
                                Date = x.Date,
                                Fields = x.Fields,
                                Title = x.Title.AsHighlighted(new HighlightSpec
                                {
                                    PreTag = "",
                                    PostTag = ""
                                }),
                                Content = x.Content.AsHighlighted(
                                  new HighlightSpec
                                  {
                                      PreTag = "",
                                      PostTag = ""
                                  })
                            })
                            .GetResult();

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. 

Thanks

Gordon

#146530
Mar 17, 2016 10:52
Vote:
 

It should be in the EPiServer.Find.Framework assembly, in the EPiServer.Find.Framework.Statistics namespace.

#146537
Mar 17, 2016 11:40
Vote:
 

Hi,

I'm looking in packages\EPiServer.Find.11.1.2.4113\lib\net45\EPiServer.Find.dll installed by NuGet

That namespace doesn't exist. This is from http://nuget.episerver.com/feed/packages.svc/

Thanks

Gordon

#146539
Mar 17, 2016 12:04
Vote:
 

You'll need to install the EPiSErver.Find.Framework package

#146540
Mar 17, 2016 12:12
Vote:
 

Hi,

I've installed EPiServer.Framework.9.7.2 and am still struggling to find the namespace.

THanks

Gordon

#146557
Mar 17, 2016 14:02
Vote:
 

Make sure you also have the "EPiServer.Find.Framework" - https://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Find.Framework

#146559
Edited, Mar 17, 2016 14:12
Vote:
 

Apologies, I misread the namespace, it works now.

Thanks!

#146563
Mar 17, 2016 14:47
Vote:
 

No problem. Glad it worked out!

#146564
Mar 17, 2016 14:49
Vote:
 

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=11.1.2.4113, 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

#146571
Mar 17, 2016 16:45
Vote:
 

Ah. It's in the EPiServer.Find.Cms package: https://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Find.CMS

#146579
Mar 18, 2016 8:50
Vote:
 

Hi,

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.

Cheers

Gordon

#146606
Mar 18, 2016 14:18
Vote:
 

Hi,

Any update on this? 

Thanks

Gordon

#146732
Mar 22, 2016 10:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.