You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sorting on '-updated' on ogcapi-records, a random order is returned, maybe due to a combination of sorting on modification_date and date_revision or date?
insert-date is the same for most of my content, because i imported all records at a single moment, expected would be that the modified-date of the metadata record itself was used (or if empty, insert-date), this logic is also applied in
Description
When sorting on '-updated' on ogcapi-records, a random order is returned, maybe due to a combination of sorting on modification_date and date_revision or date?
On demo the effect is less obvious because only 2 dates exist, but
https://demo.pycsw.org/gisdata/collections/metadata:main/items?sortby=-updated&offset=100 returns same order as https://demo.pycsw.org/gisdata/collections/metadata:main/items?sortby=updated&offset=100
Steps to Reproduce
load some data with various dates populated, oreder by
updated
Additional Information
relevant code seems
pycsw/pycsw/core/repository.py
Line 151 in c532be3
insert-date is the same for most of my content, because i imported all records at a single moment, expected would be that the modified-date of the metadata record itself was used (or if empty, insert-date), this logic is also applied in
pycsw/pycsw/ogc/api/records.py
Line 1177 in c532be3
the problem here is that date-modified is not always populated, can we populate it at insert if nill?
alternative solution display dataset date and order by dataset date (which is usually more relevant, but not always populated)
see #365
The text was updated successfully, but these errors were encountered: