Page MenuHomePhabricator

Sort media by date captured in MediaSearch
Open, Needs TriagePublicFeature

Description

Imported from the 2023 Community Wishlist Survey proposal by @Jelican9

Feature summary (what you would like to be able to do and where):

An option to sort media by the date a photo or video was captured in Special:MediaSearch

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Find recent files.

Benefits (why should this be implemented?):

Better wiki content

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Lectrician1: Why was this duplicated here? Do you plan to update the wiki page to link to this Phab task? Thanks.

Duplicated here because it's a good feature request. The page does have the phab task linked, its just that its changes just need to be marked for translation.

Hi, I would like to provide a use case for this proposal.

Recently, I and other people are searching contents from Leiden University archive and Tropenmuseum archive in Commons about a specific city in Indonesia. They are great source material from 1940s and before. For example:

The problem arise when I want to filter the general search result by date of the pictures

Let's say I want to find the recent images (post 1940s) of this city, or images from pre-20th century, ideally, the requested filter would allow me to find the images I'm looking for.

El_Grafo renamed this task from Sort media by data captured in MediaSearch to Sort media by date captured in MediaSearch.Mar 29 2023, 9:00 AM

If we include iiprop=extmetadata and sort based on DateTimeOriginal, it seems like the format varies a lot. Do you know of any existing extensions that can convert it into a standardized format, making it easier for us to read and use? Do you see any performance issue here with additional extmetadata?

Edit: conversation with @Cparle, provided

  1. adding iiprop=extmetadata to the XHR query on the search page to retrieve metadata, particularly the DateTimeOriginal from the date field in Template:Information. However, DateTimeOriginal is derived from a non-standard format in the Information template, making consistent processing challenging. There are potentially thousands of search results and you'd have to get them all and then sort them for the sort to work properly (atm we only get gsrlimit=40 at a time)
  1. To enable sorting on the Elasticsearch side, a date property would need to be added to the search index. A post-upload hook to process the Information template and populate the index with the date, along with running this process on existing images. OR part of the job can be done through a community-written bot that copy the date from the template into structured data.

Has also been asked about here. One could also use this to see latest files in a category using the deepcat search operator albeit most of the time the recency sorting works well. When it comes to sorting by date maybe it would be more useful to enable specifying a timespan.
Edit: a date range filter has now also been requested here.