Try our conversational search powered by Generative AI!

"New EPiServer FInd" Breaking changes?


I just updated one site to "New EPiServer Find" and two things broked down for me:

var result = StatisticsClient.Instance.GetSpellCheck(query, take);


var result = StatisticsClient.Instance.GetAutoComplete(query, take * 2);

This is because this is no longer availible "using EPiServer.Find.Framework.Statistics.ForInternalUseOnly;" (Yes, I know that the name should made me not use it but... ;-) )

I can't find any articles on breaking changes yet, are there any and is there any more changes you know about?

May 21, 2014 9:03

Hi Henrik =)


var client = Client.CreateFromConfig();
var statisticsClient = client.Statistics();

Edited, May 21, 2014 10:24

Hi Niklas. 

Thanks! That is a mutch more clean solution :)

May 21, 2014 11:04

The method GetTopQueries does not exist anymore. Does anyone know where I can find it or do the same call in some other way?


May 22, 2014 15:07

Hi Erik,

This was something we used to use internally for the old UI. We removed the method when we had no use for it. Obviously there is a need for it so I will make sure that it is included in the next release.


May 23, 2014 9:31

We are working on gett ing an accurate updated breaking change document up as soon as possible

May 23, 2014 9:46

Thanks Marcus

More questions:

1. Is the same index compatible with both version 7 and 8 of Find?

2. When calling var statisticsClient = client.Statistics();i get an error for our dev-index (I have activated stats on
Your index does not support statistics. Please contact support to have your account upgraded.

3. Is there any workaroud for this GetTopQueries right now? Can I access the index with your interal query and get the same result?

May 23, 2014 10:05

As a workaround for the GetTopQueries, you can use something like this:

     public class StatsQueryTop
            public string Query { get; set; }
            public int Count { get; set; }

        public class TopQueryCommand : Command
            private string index;
            private int size;

            public TopQueryCommand(ICommandContext commandContext, string index, int size) : base(commandContext)
                this.index = index;
                this.size = size;

            public StatisticsHitsResult<StatsQueryTop> Execute()
                string url = GetUrl();
                var request = CommandContext.RequestFactory.CreateRequest(url, HttpVerbs.Get, ExplicitRequestTimeout);
                return GetResponse<StatisticsHitsResult<StatsQueryTop>>(request);

            private string GetUrl()
                return string.Format("{0}{1}/_stats/query/top?size={2}", GetServerUrl(), this.index, this.size);

        // TopQueryCommand usage
        public IEnumerable<StatsQueryTop> GetTopQueries(int size)
            var topQueryCommand = searchClient.NewCommand(context => new TopQueryCommand(context, searchClient.DefaultIndex, size));
            return topQueryCommand.Execute().Hits;
Jun 05, 2014 13:37

I second Eric's comment about the index not supporting statistics. I also tried to create a brand new index with activated stats, but that did not help.

Jun 13, 2014 10:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.