File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
stac_fastapi/elasticsearch/stac_fastapi/elasticsearch Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -568,7 +568,18 @@ async def delete_item(
568568 )
569569
570570 async def create_collection (self , collection : Collection , refresh : bool = False ):
571- """Database logic for creating one collection."""
571+ """Create a single collection in the database.
572+
573+ Args:
574+ collection (Collection): The Collection object to be created.
575+ refresh (bool, optional): Whether to refresh the index after the creation. Default is False.
576+
577+ Raises:
578+ ConflictError: If a Collection with the same id already exists in the database.
579+
580+ Notes:
581+ A new index is created for the items in the Collection using the `create_item_index` function.
582+ """
572583 collection_id = collection ["id" ]
573584
574585 if await self .client .exists (index = COLLECTIONS_INDEX , id = collection_id ):
You can’t perform that action at this time.
0 commit comments