London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
As long as .Take(12) and .Take(100) yields different results, .Take() is not completely ignored.
Are you sure your Find index is up to date?
.Take(12)
...will take the 12 first from the index.
if two of those pages actually are deleted from the CMS, then...
.GetContentResult();
...will return only 10 hits.
Happens all the time in dev environments where multiple developers share and mix databases en find indexes.
Just running a simple Find query as such:
var results = query .Take(12) .GetContentResult();
But it only returns 10. Even though total matching is 60.
This means when I am doing my pagination as such
var results = query .Skip((skip - 1) * take) .Take(take) .GetContentResult();
It never gets all the results.
I've also noticed that if I do:
var queryResult = query .Take(100) .GetContentResult();
I get 58 hits and 60 total matching, which doesn't feel right to me either!!