-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Published Content Query with skip > 0 returns incorrect results #11377
Comments
After running the code again with PR #11378 the following results are achieved, which is a little more correct.
|
By no means a well put together test, but if someone wants some tests to run against. You can update Current failures are
Where each returns one fewer result than expected. |
@Shazwazza Located the problem in Examine and opened a PR |
Partly fixes umbraco#11377
Apologies for the delay @matthewcare - thanks very much for the help much appreciated. Look forward to v9.1.0! 👍 |
Hmmm, guess we need to merge #11378 as well for this to be fully fixed? 🤔 |
@nul800sebastiaan Yeah, the newer Examine search returns the already paged results, so the additional Skip was causing the first page to be skipped. |
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
9.0.0 (also the contrib branch)
Bug summary
Strange interaction with
PublishedContentQuery
when searching withskip
andtake
. I'm experiencing unexpected results, and no results in some cases.Specifics
Here is the output of an identical set of searches with different
skip
andtake
valuesFor reference, I had 5 pages containing the word
page
,A Page, Sub Page, More page, Further sub page, Pages
In the cases where there is a
skip
of1
, the first instance said there were no results, the second instance said there were 5 results but showed none of them, and the last instance again said there were 5 results, but appeared to skip the first 2, despite saying to only skip 1.Similar results for when the
skip
is set to2
.@Shazwazza
I'm not sure if this relates to Shazwazza/Examine#234
Digging through
Umbraco.Cms.Infrastructure.PublishedContentQuery
, it certainly looks like this is an issue with whatever happens inside theQueryExecutor
Steps to reproduce
Create a number of pages in the CMS with a name that contains "page"
Put this in a view (for ease), or implement a controller.
Expected result / actual result
I would expect correct paging when using
skip
The text was updated successfully, but these errors were encountered: