Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am running Umbraco v 8.13. And I am trying to do a Examine search. And when I use Skip/Take to get the paged results. But when I use .Skip(0) it skips 1. I would get a total items count of 8 but I only get 7 "loopable" items. I am really struggling to see why this is happening.. When I remove the .Skip() I get a total items count of 8 and 8 "loopable" items.
I have tried upgrading the Examine package from 1.1.0 to 1.2.2. But this still occurs.
Any ideas why this is happening?
I'm also experiencing this exact same issue. I'm running Umbraco version 8.15.2 and Examine v1.2.0. I spotted this when I realised what should easily have been the top search result wasn't being returned in my results at all. After spending hours looking at my filter I realised that when I removed the .skip() the result would show up as the top result.
Yea, I also noticed that. I ended up doing something like this:
return pageNumber == 1 ? allResults.Take(pageSize) : allResults.Skip((pageNumber - 1) * pageSize -1).Take(pageSize);
It feels like a really janky solution. But it seems to do the tick..
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted