Closed pedro-cf closed 1 month ago
I think this should not happen, item IDs should only be unique within the collection. Not sure how you got this error, it seems like it is covered in the database logic: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/49fecf95a986ea5cca60af60d6b16a194cd23439/stac_fastapi/opensearch/stac_fastapi/opensearch/database_logic.py#L692-L695
Or does the Item contain the collection ID? It might be possible to POST an Item where the collection in the HTTP request does not match the collection specified in the Item body. https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/49fecf95a986ea5cca60af60d6b16a194cd23439/stac_fastapi/core/stac_fastapi/core/core.py#L684
Or does the Item contain the collection ID
You are right, my mistake...
Although this doesn't seem very logical, the collection id shouldn't be passed in the item body at all in my opinion since we already specify the collection id in the request URL:
POST http://localhost:8080/collections/{collection_id}/items
Describe the bug Currently item ID's are required to be unique across all collections. (Not sure if bug or not)
To Reproduce Steps to reproduce the behavior:
docker-compose up
collection1
collection2
item1
in collectioncollection1
item1
in collectioncollection2
Expected behavior Unsure.
Screenshots![image](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/assets/4175430/568fe57a-e5e6-49a5-8846-d9dc1f837b13)