Skip to content

Commit dbfa9c1

Browse files
author
Phil Varner
committed
Merge branch 'main' into pv/update-es-mappings
2 parents 26b06ad + e385f14 commit dbfa9c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/transactions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TransactionsClient(BaseTransactionsClient):
3232
settings = ElasticsearchSettings()
3333
client = settings.create_client
3434

35-
dynamicTemplates = [
35+
ES_MAPPINGS_DYNAMIC_TEMPLATES = [
3636
# Common https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md
3737
{
3838
"descriptions": {
@@ -81,9 +81,9 @@ class TransactionsClient(BaseTransactionsClient):
8181
{"numerics": {"match_mapping_type": "long", "mapping": {"type": "float"}}},
8282
]
8383

84-
mappings = {
84+
ES_MAPPINGS = {
8585
"numeric_detection": False,
86-
"dynamic_templates": dynamicTemplates,
86+
"dynamic_templates": ES_MAPPINGS_DYNAMIC_TEMPLATES,
8787
"properties": {
8888
"geometry": {"type": "geo_shape"},
8989
"assets": {"type": "object", "enabled": False},
@@ -109,7 +109,7 @@ def create_item_index(self):
109109
"""Create the index for Items."""
110110
self.client.indices.create(
111111
index="stac_items",
112-
body={"mappings": self.mappings},
112+
body={"mappings": self.ES_MAPPINGS},
113113
ignore=400, # ignore 400 already exists code
114114
)
115115

0 commit comments

Comments
 (0)