Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Facet for Enumerable field

$
0
0

I have an index of Products, each with a Manufacturer. I created a histogram facet for the Manufacturer Ids in this way:

HistogramFacetFor(p => p.manufacturer.Id, 1)


and this worked just fine. Then I learned each Product can have a list of Manufacturers. How can I create a facet now?

For example, if the index contains Products:

{Product1
Manufacturers: [{Man1 Id: 1} {Man2 Id: 2}]
}
{Product2
Manufacturers: [{Man3 Id: 3} {Man2 Id: 2}]
}

I need to know that there is:
1 product with Manufacturer.Id 1
2 products with Manufacturer.Id 2
1 product with Manufacturer.Id 3

Thanks


Viewing all articles
Browse latest Browse all 6894

Trending Articles