Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Simple Unified Search



I've got a test index and have created a simple stand-alone project.

                     IClient client = Client.CreateFromConfig();

                     int nMaxResults = 50;

                    var dateRanges = new List()
                        new DateRange { From = DateTime.Now.AddDays(-1), To = DateTime.Now },
                        new DateRange { From = DateTime.Now.AddDays(-7), To = DateTime.Now.AddDays(-1) },
                        new DateRange { From = DateTime.Now.AddDays(-30), To = DateTime.Now.AddDays(-7) },
                        new DateRange { From = DateTime.Now.AddDays(-365), To = DateTime.Now.AddDays(-365) },
                        new DateRange { From = DateTime.Now.AddYears(-2), To = DateTime.Now.AddDays(-365) },


                   var searchResult = client.UnifiedSearchFor("Work", Language.English)
                            .RangeFacetFor(x => x.SearchPublishDate, dateRanges.ToArray())
                            .FilterFacet("PublishedDate", x => x.SearchPublishDate.InRange(new DateTime(1456790400), new DateTime(1459468800)))

                    Console.WriteLine("There are " + searchResult.TotalMatching + " results");

When I run this I get the exception:

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'

what am I doing wrong?

Mar 29, 2016 16:48

Probably missing some structuremap cant resolve the interface to a concrete class...

Edited, Mar 29, 2016 17:15

and what does this involve.. in simple terms... 

Mar 29, 2016 17:16

Start by checking that you have the assembly EPiServer.Find.Framework in bin folder of your project with correct version. And with a stand alone project...what are we talking about? I'm guessing this is the root of the problem. A lot of interface => concrete class mappings for EPiServer Find are configured out of the box if you let EPiServer handle that structure map configuration for you. If you have a separate project, like web api, unit test etc, you will need to set up that structure map resolving for yourself

Edited, Mar 29, 2016 17:38


Do you know of any documentation which covers this? It's not clear from what I've seen here :

Mar 29, 2016 18:46

What are you trying to do? maybe I can suggest an alternative approach?

Mar 29, 2016 20:28

We're trying to use the Find product without necessarily requiring the use of the CRM system.

My understanding was that it should be possible but it seems to be quite tightly integrated. We're trying to strip it down to bare bones to learn how it works.

Thanks for any assistance.



Mar 29, 2016 20:34

If you would like to use Find standalone, i.e. without CMS integration, then you should have only EPiServer.Find.dll in your bin folder and use only API available there. The core API does not need any StructureMap configuration.

There are two main assemblies responsible for integration with Episerver CMS: EPiServer.Find.Cms and EPiServer.Find.Framework. The ApplyBestBets() extension method is from EPiServer.Find.Framework assembly which requires StructureMap initialization and setup.

Mar 30, 2016 10:41


Does this mean we can't use Track() in standalone mode?

Mar 30, 2016 11:00

Technically, it might work if you add a reference to EPiServer.Find.Statistics assembly, but semantically its a part of CMS integration.

Mar 30, 2016 11:10

Unfortunately I get the same exception with just .Track().

Is there any documentation on how I can setup structuremaps?


Mar 30, 2016 15:59

Try to use .StatisticsTrack() extension method from EPiServer.Find.Statistics namespace and make sure you do not refer to EPiServer.Find.Framework.dll in your project. 

Mar 30, 2016 17:07

Hi Sergil,

Which assembly contains EPiServer.Find.Statistics?


Apr 04, 2016 14:59

It's in EPiServer.Find.Statistics.dll, which you can find in EPiServer.Find.Cms NuGet package. You will need to extract this assembly from the NuGet package (just unzip it) and add a reference to it to your project. Do not install the package into your project - this will bring CMS and Framework dependencies that you want to avoid. 

Apr 04, 2016 15:29


I've done that and can call it without it a runtime error. Unfortunately it doesn't seem to work, if I track it through fidder I can see an extra call being made to the javascript endpoint:


The endpoint responds with :


HTTP/1.1 408 Request body incomplete

Date: Mon, 04 Apr 2016 15:33:02 GMT

Content-Type: text/html; charset=UTF-8

Connection: close

Cache-Control: no-cache, must-revalidate

Timestamp: 16:33:02.617


The request body did not contain the specified number of bytes. Got 0, expected 138                                                                                                                                                                                                                                                                                                                                                                                                                                             

Apr 06, 2016 12:43
* 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.