Skip to content

Commit ebfc053

Browse files
committed
es to os
1 parent c8902d6 commit ebfc053

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stac_fastapi/opensearch/stac_fastapi/opensearch/database_logic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ async def get_all_collections(
163163
filter: Optional[Dict[str, Any]] = None,
164164
query: Optional[Dict[str, Dict[str, Any]]] = None,
165165
) -> Tuple[List[Dict[str, Any]], Optional[str]]:
166-
"""Retrieve a list of collections from Elasticsearch, supporting pagination.
166+
"""Retrieve a list of collections from OpenSearch, supporting pagination.
167167
168168
Args:
169169
token (Optional[str]): The pagination token.
@@ -195,7 +195,7 @@ async def get_all_collections(
195195
raise HTTPException(
196196
status_code=400,
197197
detail=f"Field '{field}' is not sortable. Sortable fields are: {', '.join(sortable_fields)}. "
198-
+ "Text fields are not sortable by default in Elasticsearch. "
198+
+ "Text fields are not sortable by default in OpenSearch. "
199199
+ "To make a field sortable, update the mapping to use 'keyword' type or add a '.keyword' subfield. ",
200200
)
201201
formatted_sort.append({field: {"order": direction}})
@@ -252,7 +252,7 @@ async def get_all_collections(
252252
# Convert string filter to dict if needed
253253
if isinstance(filter, str):
254254
filter = orjson.loads(filter)
255-
# Convert the filter to an Elasticsearch query using the filter module
255+
# Convert the filter to an OpenSearch query using the filter module
256256
es_query = filter_module.to_es(await self.get_queryables_mapping(), filter)
257257
query_parts.append(es_query)
258258

@@ -278,7 +278,7 @@ async def get_all_collections(
278278
query_parts.append(search_dict["query"])
279279
except Exception as e:
280280
logger = logging.getLogger(__name__)
281-
logger.error(f"Error converting query to Elasticsearch: {e}")
281+
logger.error(f"Error converting query to OpenSearch: {e}")
282282
# If there's an error, add a query that matches nothing
283283
query_parts.append({"bool": {"must_not": {"match_all": {}}}})
284284
raise

0 commit comments

Comments
 (0)