Skip to content

Commit 8a2f3cc

Browse files
authored
Merge branch 'main' into for_other_os_schema
2 parents 310a25d + a7cdd15 commit 8a2f3cc

File tree

10 files changed

+955
-232
lines changed

10 files changed

+955
-232
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Added
1111

12-
- Added catalogs route support to enable federated hierarchical catalog browsing and navigation in the STAC API. [#547](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/547)
12+
- Added optional `/catalogs` route support to enable federated hierarchical catalog browsing and navigation. [#547](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/547)
13+
- Added DELETE `/catalogs/{catalog_id}/collections/{collection_id}` endpoint to support removing collections from catalogs. When a collection belongs to multiple catalogs, it removes only the specified catalog from the collection's parent_ids. When a collection belongs to only one catalog, the collection is deleted entirely. [#554](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/554)
14+
- Added `parent_ids` internal field to collections to support multi-catalog hierarchies. Collections can now belong to multiple catalogs, with parent catalog IDs stored in this field for efficient querying and management. [#554](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/554)
1315

1416

1517
### Changed
@@ -19,6 +21,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1921
### Fixed
2022

2123
- Fix unawaited coroutine in `stac_fastapi.core.core`. [#551](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/551)
24+
- Parse `ES_TIMEOUT` environment variable as an integer. [#556](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/556)
25+
- Implemented "Smart Unlink" logic in delete_catalog: when cascade=False (default), collections are unlinked from the catalog and become root-level orphans if they have no other parents, rather than being deleted. When cascade=True, collections are deleted entirely. This prevents accidental data loss and supports poly-hierarchy scenarios where collections belong to multiple catalogs. [#557](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/557)
26+
- Fixed delete_catalog to use reverse lookup query on parent_ids field instead of fragile link parsing. This ensures all collections are found and updated correctly, preventing ghost relationships where collections remain tagged with deleted catalogs, especially in large catalogs or pagination scenarios. [#557](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/557)
2227

2328
### Removed
2429

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![GitHub forks](https://img.shields.io/github/forks/stac-utils/stac-fastapi-elasticsearch-opensearch.svg?color=blue)](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/network/members)
1414
[![PyPI version](https://img.shields.io/pypi/v/stac-fastapi-elasticsearch.svg?color=blue)](https://pypi.org/project/stac-fastapi-elasticsearch/)
1515
[![STAC](https://img.shields.io/badge/STAC-1.1.0-blue.svg)](https://github.com/radiantearth/stac-spec/tree/v1.1.0)
16-
[![stac-fastapi](https://img.shields.io/badge/stac--fastapi-6.0.0-blue.svg)](https://github.com/stac-utils/stac-fastapi)
16+
[![stac-fastapi](https://img.shields.io/badge/stac--fastapi-6.1.1-blue.svg)](https://github.com/stac-utils/stac-fastapi)
1717

1818
## Sponsors & Supporters
1919

@@ -28,6 +28,7 @@ The following organizations have contributed time and/or funding to support the
2828

2929
## Latest News
3030

31+
- **12/09/2025:** Feature Merge: **Federated Catalogs**. The [`Catalogs Endpoint`](https://github.com/Healy-Hyperspatial/stac-api-extensions-catalogs-endpoint) extension is now in main! This enables a registry of catalogs and supports **poly-hierarchy** (collections belonging to multiple catalogs simultaneously). Enable it via `ENABLE_CATALOGS_EXTENSION`. _Coming next: Support for nested sub-catalogs._
3132
- **11/07/2025:** 🌍 The SFEOS STAC Viewer is now available at: https://healy-hyperspatial.github.io/sfeos-web. Use this site to examine your data and test your STAC API!
3233
- **10/24/2025:** Added `previous_token` pagination using Redis for efficient navigation. This feature allows users to navigate backwards through large result sets by storing pagination state in Redis. To use this feature, ensure Redis is configured (see [Redis for navigation](#redis-for-navigation)) and set `REDIS_ENABLE=true` in your environment.
3334
- **10/23/2025:** The `EXCLUDED_FROM_QUERYABLES` environment variable was added to exclude fields from the `queryables` endpoint. See [docs](#excluding-fields-from-queryables).
@@ -239,6 +240,7 @@ This implementation follows the [STAC API Catalogs Extension](https://github.com
239240
### Features
240241

241242
- **Hierarchical Navigation**: Browse catalogs and sub-catalogs in a parent-child relationship structure
243+
- **Multi-Catalog Collections**: Collections can belong to multiple catalogs simultaneously, enabling flexible organizational hierarchies
242244
- **Collection Discovery**: Access collections within specific catalog contexts
243245
- **STAC API Compliance**: Follows STAC specification for catalog objects and linking
244246
- **Flexible Querying**: Support for standard STAC API query parameters when browsing collections within catalogs
@@ -252,6 +254,7 @@ This implementation follows the [STAC API Catalogs Extension](https://github.com
252254
- **GET `/catalogs/{catalog_id}/collections`**: Retrieve collections within a specific catalog
253255
- **POST `/catalogs/{catalog_id}/collections`**: Create a new collection within a specific catalog
254256
- **GET `/catalogs/{catalog_id}/collections/{collection_id}`**: Retrieve a specific collection within a catalog
257+
- **DELETE `/catalogs/{catalog_id}/collections/{collection_id}`**: Delete a collection from a catalog (removes parent_id if multiple parents exist, deletes collection if it's the only parent)
255258
- **GET `/catalogs/{catalog_id}/collections/{collection_id}/items`**: Retrieve items within a collection in a catalog context
256259
- **GET `/catalogs/{catalog_id}/collections/{collection_id}/items/{item_id}`**: Retrieve a specific item within a catalog context
257260

@@ -292,6 +295,11 @@ curl "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2/it
292295
# Get specific item within a catalog
293296
curl "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2/items/S2A_20231015_123456"
294297

298+
# Delete a collection from a catalog
299+
# If the collection has multiple parent catalogs, only removes this catalog from parent_ids
300+
# If this is the only parent catalog, deletes the collection entirely
301+
curl -X DELETE "http://localhost:8081/catalogs/earth-observation/collections/sentinel-2"
302+
295303
# Delete a catalog (collections remain intact)
296304
curl -X DELETE "http://localhost:8081/catalogs/earth-observation"
297305

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
- ES_PORT=9200
2121
- ES_USE_SSL=false
2222
- ES_VERIFY_CERTS=false
23+
- ES_TIMEOUT=30
2324
- BACKEND=elasticsearch
2425
- DATABASE_REFRESH=true
2526
- ENABLE_COLLECTIONS_SEARCH_ROUTE=true
@@ -60,6 +61,7 @@ services:
6061
- ES_PORT=9202
6162
- ES_USE_SSL=false
6263
- ES_VERIFY_CERTS=false
64+
- ES_TIMEOUT=30
6365
- BACKEND=opensearch
6466
- STAC_FASTAPI_RATE_LIMIT=200/minute
6567
- ENABLE_COLLECTIONS_SEARCH_ROUTE=true

0 commit comments

Comments
 (0)