Hi,
I am using Unified Search and I want it to appear in the Statistics, so added the Track() method.
IEnumerable _SearchResults = searchClient.UnifiedSearch().For(queryString) .InField(x => ((BasePageData)x).MetaKeywords) .InField(x => ((BasePageData)x).MetaTitle) .InField(x => ((BasePageData)x).MetaDescription) .Track() .Filter(x => !x.MatchTypeHierarchy(typeof(ImageData))).Filter(y => !y.MatchTypeHierarchy(typeof(ContainerPage))) .Take(10).Skip((p - 1) * 10).GetResult(hitSpec, false);
The GetResult method in above statement throws exception "String reference not set to an instance of a String.\r\nParameter name: s"
Stacktrace:
at System.Text.Encoding.GetBytes(String s) at EPiServer.Find.TrackContext.HashString(String toHash) at EPiServer.Find.TrackContext..ctor() at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch`1 search, SearchContext context) at EPiServer.Find.SearchExtensions.GetResult(ITypeSearch`1 search, HitSpecification hitSpecification, Boolean filterForPublicSearch) at Trisept.Vax.Epi.ContentSite.Controllers.SearchController.PopulateViewModel(String queryString, VaxBasePageData currentPage, Int32 p) in C:\TFS\Trisept.VAX.Content\Development\Trisept.Vax.Epi\Trisept.Vax.Epi.ContentSite\Controllers\SearchController.cs:line 56 at Trisept.Vax.Epi.ContentSite.Controllers.SearchController.Index(Nullable`1 p) in C:\TFS\Trisept.VAX.Content\Development\Trisept.Vax.Epi\Trisept.Vax.Epi.ContentSite\Controllers\SearchController.cs:line 40 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
If I remove the Track() method, it works fine.
But I need to gather the statistics. Can't figure what I am doing wrong. Please help.
Thank you.
----- Update -----
The above issue occurs only when I am logged in via SAML authenticated user.
Both search and statistics work fine when the user is Epi admin