Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
This is pretty weird, not something I've seem before.
You could try verifying whether GetResult() gives the correct number, GetContentResult() returns via the database (http://bergdaniel.se/episerver-find-getresult-getcontentresult) so if your index is out-of-date that could be the cause (alternatively you could try reindexing).
/Jake
var items = Client.Search<FurnitureVariant>(requestLanguage) .Filter(x => x.GetMarkets().Match(market)) .Filter(categoryFilter) .Filter(attributeFilter) .Filter(timelessItalianFilter) .Filter(x => x.LanguageBranch.MatchCaseInsensitive(language)) .OrderBy(x => x.DisplayName); var itemsCount = items.Count(); // = 108
// pageSize = 20 var itemResult = items .Skip((page - 1) * pageSize) .Take(pageSize) .GetContentResult(); var itemResultsCount = itemResult.Count(); // = 17
If I set pageSize manually to 5, the result will be 2, so it is always wrong of 3. How do I solve this?