November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
To search/filter on complex objects you can use https://github.com/x2find/Nested2Find/ (also available on the EPiServer nuget feed). The published version doesn't support nested faceting but there is a feature branch (https://github.com/x2find/Nested2Find/tree/nested-facets) that you can pull and build yourself that currently supports terms/histogram facets for nested objects (see https://github.com/x2find/Nested2Find/blob/nested-facets/Nested2Find.Tests/Stories/Nested.cs#L295 for usage).
/Henrik
Thanks Henrik!
I will give it a try and let you know.
Do you have a plan to support Find versions > 9.0 ?
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?
There is no facet filter support in the nested-facet feature branch as of yet.
/Henrik
Thanks Henrik for your reply.
To overcome this issue, I had to index the prices in a dictionary object.
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.