Skip to content

Commit 8330771

Browse files
Merge branch 'main' into CAT-1413-2
2 parents 4fec6e1 + 5723bba commit 8330771

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
### Changed
1717

1818
- Changed assets serialization to prevent mapping explosion while allowing asset inforamtion to be indexed. [#341](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/341)
19+
- Blocked the /collections/{collection_id}/bulk_items endpoint when environmental variable ENABLE_DATETIME_INDEX_FILTERING is set to true. [#438](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/438)
1920

2021
### Fixed
2122

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,13 @@ def bulk_item_insert(
965965
A string indicating the number of items successfully added.
966966
"""
967967
request = kwargs.get("request")
968+
969+
if os.getenv("ENABLE_DATETIME_INDEX_FILTERING"):
970+
raise HTTPException(
971+
status_code=400,
972+
detail="The /collections/{collection_id}/bulk_items endpoint is invalid when ENABLE_DATETIME_INDEX_FILTERING is set to true. Try using the /collections/{collection_id}/items endpoint.",
973+
)
974+
968975
if request:
969976
base_url = str(request.base_url)
970977
else:

0 commit comments

Comments
 (0)