Skip to content

Commit 6bd123a

Browse files
committed
ES index names configurables
1 parent 133fc72 commit 6bd123a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Database logic."""
2+
import os
23
import asyncio
34
import logging
45
from base64 import urlsafe_b64decode, urlsafe_b64encode
@@ -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)