cmr-stac
cmr-stac copied to clipboard
Sortby fails on namespaced properties
Sorting functions as expected on raw properties but fails on properties with a namespace prefix such as eo:cloud_cover
.
curl --location --request GET 'https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?bounding_box=-10,5,-9,11&datetime=2021-01-28&sortby=properties.eo:cloud_cover'
@sharkinsspatial @matthewhanson I think sorting in general might have issues, here is another example that doesn't work as expected via sat-search Python library:
from satsearch import Search
results = Search(url='https://cmr.earthdata.nasa.gov/stac/LPCLOUD',
collections=['HLSS30.v1.5'],
bbox = '-122.4,41.3,-122.1,41.5',
datetime='2021-01-01/2021-02-01',
#sortby='-properties.datetime' # results in 0 found but no error raised (but there are 13 items)
)
results.found()
This issue should be resolved with https://bugs.earthdata.nasa.gov/browse/CMR-10165 which has not yet hit the production environment: https://github.com/nasa/cmr-stac/pull/355