You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default and max allowed returned values for collections and items (#482)
**Description:**
This PR implements returned object limit constraints for collections and
items search endpoints which are set in environment variables. The
changes ensure consistent behavior between `GET` and `POST` search
methods.
**PR Checklist:**
- [x] Code is formatted and linted (run `pre-commit run --all-files`)
- [x] Tests pass (run `make test`)
- [x] Documentation has been updated to reflect changes, if applicable
- [x] Changes are added to the changelog
---------
Co-authored-by: Yuri Zmytrakov <[email protected]>
Co-authored-by: Jonathan Healy <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
16
16
17
17
### Changed
18
18
19
+
- Removed ENV_MAX_LIMIT environment variable; maximum limits are now handled by the default global limit environment variable. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482)
20
+
- Changed the default and maximum pagination limits for collections/items endpoints. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482)
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,9 +323,11 @@ You can customize additional settings in your `.env` file:
323
323
|`ENABLE_COLLECTIONS_SEARCH`| Enable collection search extensions (sort, fields, free text search, structured filtering, and datetime filtering) on the core `/collections` endpoint. |`true`| Optional |
324
324
|`ENABLE_COLLECTIONS_SEARCH_ROUTE`| Enable the custom `/collections-search` endpoint (both GET and POST methods). When disabled, the custom endpoint will not be available, but collection search extensions will still be available on the core `/collections` endpoint if `ENABLE_COLLECTIONS_SEARCH` is true. |`false`| Optional |
325
325
|`ENABLE_TRANSACTIONS_EXTENSIONS`| Enables or disables the Transactions and Bulk Transactions API extensions. This is useful for deployments where mutating the catalog via the API should be prevented. If set to `true`, the POST `/collections` route for search will be unavailable in the API. |`true`| Optional |
326
-
|`STAC_ITEM_LIMIT`| Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. |`10`| Optional |
326
+
|`STAC_GLOBAL_COLLECTION_MAX_LIMIT`| Configures the maximum number of STAC collections that can be returned in a single search request. | N/A | Optional |
327
+
|`STAC_DEFAULT_COLLECTION_LIMIT`| Configures the default number of STAC collections returned when no limit parameter is specified in the request. |`300`| Optional |
328
+
|`STAC_GLOBAL_ITEM_MAX_LIMIT`| Configures the maximum number of STAC items that can be returned in a single search request. | N/A | Optional |
329
+
|`STAC_DEFAULT_ITEM_LIMIT`| Configures the default number of STAC items returned when no limit parameter is specified in the request. |`10`| Optional |
327
330
|`STAC_INDEX_ASSETS`| Controls if Assets are indexed when added to Elasticsearch/Opensearch. This allows asset fields to be included in search queries. |`false`| Optional |
328
-
|`ENV_MAX_LIMIT`| Configures the environment variable in SFEOS to override the default `MAX_LIMIT`, which controls the limit parameter for returned items and STAC collections. |`10,000`| Optional |
329
331
|`USE_DATETIME`| Configures the datetime search behavior in SFEOS. When enabled, searches both datetime field and falls back to start_datetime/end_datetime range for items with null datetime. When disabled, searches only by start_datetime/end_datetime range. |`true`| Optional |
0 commit comments