Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all articles
Browse latest Browse all 9642

Search and Navigation: RangeFacetFor with collection of numeric values

$
0
0

Hello everyone.

I am using Commerce 14, I have indexed a List<int> values for my products that come from the associated Variants, and I am creating a search where I would like to use those values to create numeric range facets using the mentioned List<int>. The problem is that when I try to use:

searchQuery = searchQuery.RangeFacetFor(x => x.ListNumericProperties);

I got the error: System.NotSupportedException: Cannot create range facet for ListNumericProperties. Range facets can only be created for numerical types and their nullable counterparts as well as dates.

Does anyone know a workaround for what I am trying to achieve here? I could parse the List<int> to List<string> and use TermsFacetFor() but I will lose the functionality of the RangeFacetFor to get the Count number.


Viewing all articles
Browse latest Browse all 9642

Trending Articles