Closed
Description
Describe the bug
The ID field is not included in the collections
index mappings until a collection document is written to it. This causes this error on the base route of an empty API.
{"code":"RequestError","description":"RequestError(400, 'search_phase_execution_exception', 'No mapping found for [id] in order to sort on')"}
To Reproduce
Steps to reproduce the behavior:
- Point API at elasticsearch or opensearch so
create_collection_index
is run at startup. - Go to the base route
/
or the/collections
route - See error
Expected behavior
To see the STAC API landing page info
{"type":"Catalog","id":"stac-fastapi","title":"stac-fastapi","description":"stac-fastapi","stac_version":"1.0.0","conformsTo":["http://www.opengis.net/spec/cql2/1.0/conf/cql2-text","http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30","http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/filter","http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core","https://api.stacspec.org/v1.0.0/ogcapi-features","https://api.stacspec.org/v1.0.0/item-search#query","http://www.opengis.net/spec/cql2/1.0/conf/cql2-json","http://www.opengis.net/spec/ogcapi-features-3/1.0/conf/features-filter","https://api.stacspec.org/v1.0.0/item-search","https://api.stacspec.org/v1.0.0/collections","http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators","https://api.stacspec.org/v1.0.0/item-search#fields","http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson","https://api.stacspec.org/v1.0.0-rc.2/item-search#context","https://api.stacspec.org/v1.0.0-rc.2/item-search#filter","https://api.stacspec.org/v1.0.0/core","https://api.stacspec.org/v1.0.0/item-search#sort","http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2","https://api.stacspec.org/v1.0.0-rc.3/ogcapi-features/extensions/transaction"],"links":[],"stac_extensions":[]}
Metadata
Metadata
Assignees
Labels
No labels