Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
Some kind of caching problem maybe? Possible to run without cache and try?
Hi Daniel,
thanks for replying. The search query is without caching.
Worth to mention that changing the filter to f.ValidFrom.InRange(DateTime.MinValue, DateTime.MaxValue still have the same result (returning no facets).
Hi,
Can you check if you by accident index null values? Range/before/after will not match a null/non existant value.
/Henrik
Not an answer to the original question, but in case you are going to cache this using StaticallyCacheFor - make sure that you are not using DateTime.Now / DateTime.UtcNow as this will create unique queries for every second passed :-)
Hi,
@Henrik, all our dates have values. If the validTo date is not set in the CMS/Commerce, we set it to the max date.
@Per, thanks for the heads up :-)!
Danie
Hi,
I've renamed the ValidFrom and ValidTo fields to PriceValidFrom and PriceValidTo. Its been a week and not problems yet (fingers crossed :-)
I'm not sure why it makes a difference, but though it worth to mention.
Hi,
I'm building a facet with a filter (in a nested structure). The facet with filter stops to work randomlly.
My facet/filter
f =>
f.PriceIsSellable.Match(true) &
f.Currency.Match(filter.Currency) &
f.CountryCodes.Match(filter.Country) &
f.ValidFrom.Before(DateTime.UtcNow) &
f.ValidTo.After(DateTime.UtcNow)
Debugging the problem is with the filter fGbp.ValidFrom.Before(DateTime.UtcNow). I've checked the data in the index and there is no obvious reason that I can see why it breaks. Clearning the index and rebuild seems to fix the issue for the time being.
We are using EPiServer Find version 10.1.0.3493
Thanks in advance
Danie