RangeFacetFor gives this error for any field defined as Decimal but works fine with Int and doubles. I am wondering is there any way to work with the decimals. Is it a bug?
We get following error "Cannot create range facet for TestDecimal. Range facets can only be created for numerical types and their nullable counterparts as well as dates."
public class BookProduct : ProductContent
{
[Display(
Name = "RRP",
Description = "The RRP for the book.")]
public virtual int TestInt { get; set; }
[Display(
Name = "RRP",
Description = "The RRP for the book.")]
public virtual decimal TestDecimal { get; set; }
}
-------------------------------------------------
var productContents3 = SearchClient.Instance.Search()
RangeFacetFor gives this error for any field defined as Decimal but works fine with Int and doubles. I am wondering is there any way to work with the decimals. Is it a bug?
We get following error "Cannot create range facet for TestDecimal. Range facets can only be created for numerical types and their nullable counterparts as well as dates."
public class BookProduct : ProductContent
{
[Display(
Name = "RRP",
Description = "The RRP for the book.")]
public virtual int TestInt { get; set; }
[Display(
Name = "RRP",
Description = "The RRP for the book.")]
public virtual decimal TestDecimal { get; set; }
}
-------------------------------------------------
var productContents3 = SearchClient.Instance.Search()
.RangeFacetFor(x => x.TestInt, priceRanges.ToArray())
.GetContentResult();
var productContents2 = SearchClient.Instance.Search()
.RangeFacetFor(x => x.TestDecimal, priceRanges.ToArray())
.GetContentResult();
---------------------------------------------