Add pytest test_pagination_different_collections #314
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue(s):
/searchwith?limitfails with same item ID in different collections #315Description:
Hi, when the same item (with the same ID) exists in two collections, the
/searchendpoint withoutlimitparameter returns the expected result = all items from all collections.But when we add a
limitparameter, the /search endpoint fails: it returns only items from the first collection, with a 'next' link that should allow to get items from the next collections, but this 'next' link doesn't work: it returns nothing. The "previous" link is invalid also.I have implemented this pytest to demonstrate this: https://github.com/stac-utils/stac-fastapi-pgstac/pull/314/files
It starts by saving 2 items in one or two collections, depending on the use case. Then it calls
/searchwithlimit=1In a nominal use case the log shows:
In the KO use case:
PR Checklist:
pre-commithooks pass locallymake test)make docs)