cmr-stac icon indicating copy to clipboard operation
cmr-stac copied to clipboard

Sortby fails on namespaced properties

Open sharkinsspatial opened this issue 4 years ago • 1 comments

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 avatar Feb 07 '21 19:02 sharkinsspatial

@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()

scottyhq avatar Apr 19 '21 01:04 scottyhq

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

eudoroolivares2016 avatar Oct 08 '24 23:10 eudoroolivares2016