Skip to content

fix(odm): partial pagination limit the documents entering $facet#7822

Merged
soyuka merged 1 commit intoapi-platform:4.2from
divine:fix-pagination
Mar 6, 2026
Merged

fix(odm): partial pagination limit the documents entering $facet#7822
soyuka merged 1 commit intoapi-platform:4.2from
divine:fix-pagination

Conversation

@divine
Copy link
Contributor

@divine divine commented Mar 6, 2026

Q A
Branch? 4.2
Tickets Closes #..., closes #...
License MIT
Doc PR api-platform/docs#...

With partial pagination the whole result set gets buffered into $facet which hits internalQueryFacetBufferSizeBytes on large collections and silently truncates results.

Added a $limit before $facet to cap documents entering it (offset + limit), only when partial pagination is enabled since the count sub-pipeline needs the full set.

@soyuka soyuka changed the base branch from main to 4.2 March 6, 2026 08:55
@soyuka soyuka merged commit 64115e1 into api-platform:4.2 Mar 6, 2026
146 of 148 checks passed
@soyuka
Copy link
Member

soyuka commented Mar 6, 2026

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants