Skip to content

Conversation

@vincentsarago
Copy link
Member

@vincentsarago vincentsarago requested a review from hrodmn January 10, 2025 10:14
Copy link
Collaborator

@hrodmn hrodmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, good catch @vincentsarago. Where is the default limit of 10 being set? Is that in stac-fastapi or in pgstac? Could we just set the default limit to 10000 in stac-fastapi-pgstac to avoid the pgstac limit?

@vincentsarago
Copy link
Member Author

@hrodmn yeah the limit comes from pgstac https://github.com/stac-utils/pgstac/blob/6da165b7c4f6da321d0b58bbb78da2887763a0d8/src/pgstac/sql/004a_collectionsearch.sql#L88

Could we just set the default limit to 10000 in stac-fastapi-pgstac to avoid the pgstac limit?

That could be a possibility as well, but what if there are 10001 collections? 😅

I feel it's not up to us to define how many collections /collections should return, and go back to the all_collections method.

@vincentsarago vincentsarago merged commit bd13682 into patch/collection-search-paging Jan 10, 2025
@vincentsarago vincentsarago deleted the patch/use-all-collections-when-no-search branch January 10, 2025 15:00
vincentsarago added a commit that referenced this pull request Jan 13, 2025
* add failing test

* handle collection paging differently (#156)

* handle collection paging differently

* test next link

* add OffsetPaginationExtension

* uncomment test

* update to pgstac 0.9.2

* update prev logic

* only test 0.9.0

* update pypstac version

* add back 0.8 support but allow skip tests

* skip for 0.8

* remove warnings

* fallback to all_collections when `CollectionSearchExtension` is not enabled (#179)

* fallback to all_collections when `CollectionSearchExtension` is not enabled

* test all_collection fallback

* add offset=0

* Update tests/conftest.py

Co-authored-by: Henry Rodman <[email protected]>

---------

Co-authored-by: Henry Rodman <[email protected]>
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