dag-hammarskjold-library / dlx-rest

UNDHL Files and Metadata Manager
1 stars 1 forks source link

Speech records don't always sort correctly by "created" date #1534

Open viola-v opened 1 month ago

viola-v commented 1 month ago

Griet reported the following:

For this query, the results when sorted by 'created' display in this order:

image

According to 998__a, the first record was created on 20170517085500:

image

However, further down in the results is this record with a creation date in 998__a of 20170516153900:

image

Shouldn't this record display first? Is the "created" sorting not based on 998__a?

This doesn't happen consistently, usually the order is correct, and sometimes it changes later in the day.

jbukhari commented 1 month ago

@viola-v Records that were created in Horizon do not have a "created" field in the current database. Therefore those records can't be sorted using that field.

Note a related consideration with "updated". The earliest "updated" date in the database is 2020-02-14. Those are records from the initial population of the database that haven't been updated since.

So "created" and "updated" in the database are recording what has happened in this database, not the lifetime of the metadata record. However, there may be ways to combine the sort with 998 to sort the records by 998 when "created" does not exist.

viola-v commented 1 month ago

Not prioritizing for now, but potential solutions could be to include 998 as an additional search criteria or to move the data from 998__a into the system generated created date.

viola-v commented 1 month ago

Just to point out that the sorting of the example above has changed now:

image