Skip to content

Recent Collections sorting change #406

Description

@UcDust

From Eric:

If we make a change to the collection page -- say fix a typo, or anything -- it becomes the most recent thing added. This is because it looks at the modification date and well as the datePublished year, I believe. Is it possible to make the datePublished field year-month-day, and have recently added sort by that? I realize I'd need to add the month-day to each collection metadata but it seems like it would solve the issue.

We had previously sorted by datePublished, but it was treated as a string value in Elasticsearch, even though in linked-data land it's a http://www.w3.org/2001/XMLSchema#gYear type, so the sorting wasn't correct.

We should probably ingest datePublished in the collection transform as a date type, and handle formats like:
"format": "yyyy-MM-dd||yyyy-MM||yyyy"

The yearPublished is a computed value from the datePublished though, so will need to test this. Eric is planning to update the metadata with the YYYY-MM-DD format, but we should support the others as a fallback.

And, this will require a new index and reindexing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions