Skip to content

Commit 03795a5

Browse files
committed
Merge branch 'main' into stac-fastapi-2.4.3
2 parents 47ae68e + bf25781 commit 03795a5

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
- Added bbox and datetime parameters and functionality to item_collection https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/127
1313
- Added collection_id parameter to create_item function https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/127
1414
- Added item_id and collection_id to update_item https://github.com/stac-utils/stac-fastapi-elasticsearch/pull/127
15+
- The default Collection objects index can be overridden by the `STAC_COLLECTIONS_INDEX` environment variable.
16+
- The default Item objects index prefix can be overridden by the `STAC_ITEMS_INDEX_PREFIX` environment variable.
17+
1518

1619
### Changed
1720

@@ -23,7 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2326

2427
### Added
2528

26-
- Filter Extension as GET with CQL2-Text and POST with CQL2-JSON,
29+
- Filter Extension as GET with CQL2-Text and POST with CQL2-JSON,
2730
supporting the Basic CQL2 and Basic Spatial Operators conformance classes.
2831
- Added Elasticsearch local config to support snapshot/restore to local filesystem
2932

@@ -56,7 +59,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5659
- Elasticsearch index mappings updated to be more thorough.
5760
- Endpoints that return items (e.g., /search) now sort the results by 'properties.datetime,id,collection'.
5861
Previously, there was no sort order defined.
59-
- Db_to_stac serializer moved to core.py for consistency as it existed in both core and database_logic previously.
62+
- Db_to_stac serializer moved to core.py for consistency as it existed in both core and database_logic previously.
6063
- Use genexp in execute_search and get_all_collections to return results.
6164
- Added db_to_stac serializer to item_collection method in core.py.
6265

stac_fastapi/elasticsearch/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"stac-fastapi.types==2.4.3",
1414
"stac-fastapi.api==2.4.3",
1515
"stac-fastapi.extensions==2.4.3",
16-
"elasticsearch[async]==7.17.3",
16+
"elasticsearch[async]==7.17.8",
1717
"elasticsearch-dsl==7.4.0",
1818
"pystac[validation]",
1919
"uvicorn",
2020
"overrides",
2121
"starlette",
2222
"geojson-pydantic",
23-
"pygeofilter==0.1.2",
23+
"pygeofilter==0.2.0",
2424
]
2525

2626
extra_reqs = {

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Database logic."""
22
import asyncio
33
import logging
4+
import os
45
from base64 import urlsafe_b64decode, urlsafe_b64encode
56
from typing import Any, Dict, Iterable, List, Optional, Protocol, Tuple, Type, Union
67

@@ -21,8 +22,8 @@
2122

2223
NumType = Union[float, int]
2324

24-
COLLECTIONS_INDEX = "collections"
25-
ITEMS_INDEX_PREFIX = "items_"
25+
COLLECTIONS_INDEX = os.getenv("STAC_COLLECTIONS_INDEX", "collections")
26+
ITEMS_INDEX_PREFIX = os.getenv("STAC_ITEMS_INDEX_PREFIX", "items_")
2627

2728
DEFAULT_INDICES = f"*,-*kibana*,-{COLLECTIONS_INDEX}"
2829

0 commit comments

Comments
 (0)