How to build facet based on a specific object in a lists of complex objects


Here is my indexed object:

    "Prices": [
            "Price$$number": 31.5,
            "MarkedId$$string": "Market1"
            "Price$$number": 12,
            "MarkedId$$string": "Market2"
    "FinalPrice$$number": 31.5

The requirement is to build price facets based on the price value in the current user market.

I was able to build the facet basd on the FinalPrice value using this line of code:

var SearchFacetPriceRangesResult = searchFacetQueryPrice.RangeFacetFor(x => x.FinalPrice, priceRanges.ToArray())GetResult();

How can I achieve the same in complex objects.

Thanks in advance.

May 13, 2015 0:32


To search/filter on complex objects you can use (also available on the EPiServer nuget feed). The published version doesn't support nested faceting but there is a feature branch ( that you can pull and build yourself that currently supports terms/histogram facets for nested objects (see for usage).


Edited, May 13, 2015 12:28

Thanks Henrik!

I will give it a try and let you know.

Do you have a plan to support Find versions > 9.0 ?

May 13, 2015 16:46

I was able to select the nested field Price. However, all nested prices are being selected for Ranges.

I am looking for sending only the Price that exists in the current user market.

How can I add a filter for a selected nested field?

Edited, May 14, 2015 16:34

There is no facet filter support in the nested-facet feature branch as of yet.


May 18, 2015 15:16

Thanks Henrik for your reply.

To overcome this issue, I had to index the prices in a dictionary object.

May 18, 2015 16:44
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.