Skip to content

Commit dc857f5

Browse files
committed
Improve mk_actions performance #345
1 parent 527bc83 commit dc857f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stac_fastapi/core/stac_fastapi/core/database_logic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ def mk_actions(collection_id: str, processed_items: List[Item]):
200200
- `_id`: the document's identifier.
201201
- `_source`: the source of the document.
202202
"""
203+
index_alias = index_alias_by_collection_id(collection_id)
203204
return [
204205
{
205-
"_index": index_alias_by_collection_id(collection_id),
206+
"_index": index_alias,
206207
"_id": mk_item_id(item["id"], item["collection"]),
207208
"_source": item,
208209
}

0 commit comments

Comments
 (0)