Adding sorting to DQL query reduces the number of results

It is a good practice to open a new issue even if it is related to these questions.

OK! Will do for next issue.

Maybe your data doesn’t have the predicate year in all nodes. Also, cascade filter those who don’t match the query body request.

I believe it has the same predicates (doublechecked using has(predicate)). It seems it could be related to this. I am experiencing something similar, where I try to filter a lower level but it will only loop over 1000 items despite setting first: 1000000. It seems (as @iluminae writes) that the “orderasc” cancels out the possibility to filter all records before deciding on a final pagination limit:

1 Like