Skip to content
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

meta->data_returned is incorrect for paginated results with MongoDB #1140

Closed
ml-evs opened this issue May 4, 2022 · 2 comments · Fixed by #1141
Closed

meta->data_returned is incorrect for paginated results with MongoDB #1140

ml-evs opened this issue May 4, 2022 · 2 comments · Fixed by #1141
Assignees
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation

Comments

@ml-evs
Copy link
Member

ml-evs commented May 4, 2022

According to the spec, the data_returned field should be:

data_returned: an integer containing the total number of data resource objects returned for the current filter query, independent of pagination.

Currently, the query ?filter=elements HAS "Ag" yields 11 for data_returned, but adding &page_offset=1 yields 10. To my eyes, this is a bug. Other implementations (omdb, oqmd) would return 11 for both queries.

@ml-evs ml-evs added bug Something isn't working server Issues pertaining to the example server implementation priority/medium Issue or PR with a consensus of medium priority labels May 4, 2022
@ml-evs ml-evs self-assigned this May 4, 2022
@JPBergsma
Copy link
Contributor

👍 I also found this confusing.

@ml-evs
Copy link
Member Author

ml-evs commented May 6, 2022

This only affects the MongoDB/mongomock backends, fix incoming

@ml-evs ml-evs added priority/high Issue or PR with a consensus of high priority and removed priority/medium Issue or PR with a consensus of medium priority labels May 8, 2022
@ml-evs ml-evs changed the title meta->data_returned is incorrect for paginated results meta->data_returned is incorrect for paginated results with MongoDB May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority server Issues pertaining to the example server implementation
Projects
None yet
2 participants