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
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
15
15
16
16
### Fixed
17
17
18
+
[v6.5.0] - 2025-09-29
19
+
20
+
### Added
21
+
22
+
- 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)
23
+
- 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)
24
+
- 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)
25
+
- GET `/collections` collection search query extension. [#477](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/477)
26
+
- GET `/collections` collections search datetime filtering support. [#476](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/476)
27
+
28
+
### Changed
29
+
- Refactored `/collections` endpoint implementation to support both GET and POST methods. [#478](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/478)
30
+
31
+
### Fixed
32
+
- support of disabled nested attributes in the properties dictionary. [#474](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/474)
18
33
19
34
## [v6.4.0] - 2025-09-24
20
35
@@ -534,7 +549,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
534
549
- Use genexp in execute_search and get_all_collections to return results.
535
550
- Added db_to_stac serializer to item_collection method in core.py.
@@ -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)
@@ -131,9 +135,26 @@ SFEOS implements extended capabilities for the `/collections` endpoint, allowing
131
135
- Searches across multiple text fields including title, description, and keywords
132
136
- Supports partial word matching and relevance-based sorting
133
137
138
+
-**Structured Filtering**: Filter collections using CQL2 expressions
- Text format: `/collections?filter=id='sentinel-2'&filter-lang=cql2-text` (note: string values must be quoted)
141
+
- Advanced text format: `/collections?filter=id LIKE '%sentinel%'&filter-lang=cql2-text` (supports LIKE, BETWEEN, etc.)
142
+
- Supports both CQL2 JSON and CQL2 text formats with various operators
143
+
- Enables precise filtering on any collection property
144
+
145
+
-**Datetime Filtering**: Filter collections by their temporal extent using the `datetime` parameter
146
+
- Example: `/collections?datetime=2020-01-01T00:00:00Z/2020-12-31T23:59:59Z` (finds collections with temporal extents that overlap this range)
147
+
- Example: `/collections?datetime=2020-06-15T12:00:00Z` (finds collections whose temporal extent includes this specific time)
148
+
- Example: `/collections?datetime=2020-01-01T00:00:00Z/..` (finds collections with temporal extents that extend to or beyond January 1, 2020)
149
+
- Example: `/collections?datetime=../2020-12-31T23:59:59Z` (finds collections with temporal extents that begin on or before December 31, 2020)
150
+
- Collections are matched if their temporal extent overlaps with the provided datetime parameter
151
+
- This allows for efficient discovery of collections based on time periods
152
+
134
153
These extensions make it easier to build user interfaces that display and navigate through collections efficiently.
135
154
136
-
> **Configuration**: Collection search extensions 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**.
137
158
138
159
> **Note**: Sorting is only available on fields that are indexed for sorting in Elasticsearch/OpenSearch. With the default mappings, you can sort on:
139
160
> -`id` (keyword field)
@@ -144,6 +165,7 @@ These extensions make it easier to build user interfaces that display and naviga
144
165
>
145
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.
146
167
168
+
147
169
## Package Structure
148
170
149
171
This project is organized into several packages, each with a specific purpose:
@@ -156,7 +178,7 @@ This project is organized into several packages, each with a specific purpose:
156
178
- Shared logic and utilities that improve code reuse between backends
157
179
158
180
-**stac_fastapi_elasticsearch**: Complete implementation of the STAC API using Elasticsearch as the backend database. This package depends on both `stac_fastapi_core` and `sfeos_helpers`.
159
-
-
181
+
160
182
-**stac_fastapi_opensearch**: Complete implementation of the STAC API using OpenSearch as the backend database. This package depends on both `stac_fastapi_core` and `sfeos_helpers`.
161
183
162
184
## Examples
@@ -274,12 +296,13 @@ You can customize additional settings in your `.env` file:
274
296
|`ENABLE_DIRECT_RESPONSE`| Enable direct response for maximum performance (disables all FastAPI dependencies, including authentication, custom status codes, and validation) |`false`| Optional |
275
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 |
276
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 |
|`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 |
279
302
|`STAC_ITEM_LIMIT`| Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. |`10`| Optional |
280
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 |
281
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 |
282
-
|`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 |
305
+
|`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 |
283
306
284
307
> [!NOTE]
285
308
> The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, `ES_VERIFY_CERTS` and `ES_TIMEOUT` apply to both Elasticsearch and OpenSearch backends, so there is no need to rename the key names to `OS_` even if you're using OpenSearch.
@@ -448,7 +471,6 @@ The system uses a precise naming convention:
448
471
-`ENABLE_COLLECTIONS_SEARCH`: Set to `true` (default) to enable collection search extensions (sort, fields). Set to `false` to disable.
449
472
-`ENABLE_TRANSACTIONS_EXTENSIONS`: Set to `true` (default) to enable transaction extensions. Set to `false` to disable.
450
473
451
-
452
474
## Collection Pagination
453
475
454
476
-**Overview**: The collections route supports pagination through optional query parameters.
0 commit comments