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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
17
17
18
18
### Added
19
19
20
+
- Environment variable `ENABLE_COLLECTIONS_SEARCH_ROUTE` to turn on/off the `/collections-search` endpoint. [#478](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/478)
21
+
- POST and GET `/collections-search` endpoint for collections search queries, needed because POST /collections search will not work when the Transactions Extension is enabled. Defaults to `False`[#478](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/478)
20
22
- GET `/collections` collection search structured filter extension with support for both cql2-json and cql2-text formats. [#475](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/475)
21
23
- GET `/collections` collection search query extension. [#477](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/477)
22
24
- GET `/collections` collections search datetime filtering support. [#476](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/476)
23
25
24
26
### Changed
27
+
- Refactored `/collections` endpoint implementation to support both GET and POST methods. [#478](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/478)
25
28
26
29
### Fixed
27
-
28
30
- support of disabled nested attributes in the properties dictionary. [#474](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/474)
@@ -115,7 +115,11 @@ This project is built on the following technologies: STAC, stac-fastapi, FastAPI
115
115
116
116
## Collection Search Extensions
117
117
118
-
SFEOS implements extended capabilities for the `/collections` endpoint, allowing for more powerful collection discovery:
118
+
SFEOS provides enhanced collection search capabilities through two primary routes:
119
+
-**GET/POST `/collections`**: The standard STAC endpoint with extended query parameters
120
+
-**GET/POST `/collections-search`**: A custom endpoint that supports the same parameters, created to avoid conflicts with the STAC Transactions extension if enabled (which uses POST `/collections` for collection creation)
121
+
122
+
These endpoints support advanced collection discovery features including:
119
123
120
124
-**Sorting**: Sort collections by sortable fields using the `sortby` parameter
121
125
- Example: `/collections?sortby=+id` (ascending sort by ID)
@@ -146,11 +150,11 @@ SFEOS implements extended capabilities for the `/collections` endpoint, allowing
146
150
- Collections are matched if their temporal extent overlaps with the provided datetime parameter
147
151
- This allows for efficient discovery of collections based on time periods
148
152
149
-
> **Note on HTTP Methods**: All collection search extensions (sorting, field selection, free text search, structured filtering, and datetime filtering) currently only support GET requests. POST requests with these parameters in the request body are not yet supported.
150
-
151
153
These extensions make it easier to build user interfaces that display and navigate through collections efficiently.
152
154
153
-
> **Configuration**: Collection search extensions (sorting, field selection, free text search, structured filtering, and datetime filtering) can be disabled by setting the `ENABLE_COLLECTIONS_SEARCH` environment variable to `false`. By default, these extensions are enabled.
155
+
> **Configuration**: Collection search extensions (sorting, field selection, free text search, structured filtering, and datetime filtering) for the `/collections` endpoint can be disabled by setting the `ENABLE_COLLECTIONS_SEARCH` environment variable to `false`. By default, these extensions are enabled.
156
+
>
157
+
> **Configuration**: The custom `/collections-search` endpoint can be enabled by setting the `ENABLE_COLLECTIONS_SEARCH_ROUTE` environment variable to `true`. By default, this endpoint is **disabled**.
154
158
155
159
> **Note**: Sorting is only available on fields that are indexed for sorting in Elasticsearch/OpenSearch. With the default mappings, you can sort on:
156
160
> -`id` (keyword field)
@@ -161,6 +165,7 @@ These extensions make it easier to build user interfaces that display and naviga
161
165
>
162
166
> **Important**: Adding keyword fields to make text fields sortable can significantly increase the index size, especially for large text fields. Consider the storage implications when deciding which fields to make sortable.
163
167
168
+
164
169
## Package Structure
165
170
166
171
This project is organized into several packages, each with a specific purpose:
@@ -291,8 +296,9 @@ You can customize additional settings in your `.env` file:
291
296
|`ENABLE_DIRECT_RESPONSE`| Enable direct response for maximum performance (disables all FastAPI dependencies, including authentication, custom status codes, and validation) |`false`| Optional |
292
297
|`RAISE_ON_BULK_ERROR`| Controls whether bulk insert operations raise exceptions on errors. If set to `true`, the operation will stop and raise an exception when an error occurs. If set to `false`, errors will be logged, and the operation will continue. **Note:** STAC Item and ItemCollection validation errors will always raise, regardless of this flag. |`false`| Optional |
293
298
|`DATABASE_REFRESH`| Controls whether database operations refresh the index immediately after changes. If set to `true`, changes will be immediately searchable. If set to `false`, changes may not be immediately visible but can improve performance for bulk operations. If set to `wait_for`, changes will wait for the next refresh cycle to become visible. |`false`| Optional |
294
-
|`ENABLE_COLLECTIONS_SEARCH`| Enable collection search extensions (sort, fields, free text search, structured filtering, and datetime filtering). |`true`| Optional |
295
-
|`ENABLE_TRANSACTIONS_EXTENSIONS`| Enables or disables the Transactions and Bulk Transactions API extensions. If set to `false`, the POST `/collections` route and related transaction endpoints (including bulk transaction operations) will be unavailable in the API. This is useful for deployments where mutating the catalog via the API should be prevented. |`true`| Optional |
299
+
|`ENABLE_COLLECTIONS_SEARCH`| Enable collection search extensions (sort, fields, free text search, structured filtering, and datetime filtering) on the core `/collections` endpoint. |`true`| Optional |
300
+
|`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 |
301
+
|`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 |
296
302
|`STAC_ITEM_LIMIT`| Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. |`10`| Optional |
297
303
|`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 |
298
304
|`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 |
@@ -442,7 +448,6 @@ The system uses a precise naming convention:
442
448
-`ENABLE_COLLECTIONS_SEARCH`: Set to `true` (default) to enable collection search extensions (sort, fields). Set to `false` to disable.
443
449
-`ENABLE_TRANSACTIONS_EXTENSIONS`: Set to `true` (default) to enable transaction extensions. Set to `false` to disable.
444
450
445
-
446
451
## Collection Pagination
447
452
448
453
-**Overview**: The collections route supports pagination through optional query parameters.
0 commit comments