guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 121 forks source link

Add API filters for print usage info #4122

Closed andrew-nowak closed 1 year ago

andrew-nowak commented 1 year ago

What does this change?

Adds some media API search filters to allow drilling down into images which have print usages which meet several criteria:

printUsageIssueDate is required to query on print usages like this (there's no technical reason, but it doesn't really make sense to query without it)

These use filters rather than query syntax / chips because that I originally thought that gave us an extra level of control over the querying of nested fields (I thought that +usage@issueDate:2023-01-01 +usage@sectionCode:1jo would give us images where at least one usage was on the date, and at least one usage was in the section, but not necessarily the same usage. I'm less convinced of that now.). But I still think it's nicer for our purposes to use filters than chips (where grid UI helps phrase the chip correctly, but in API you're on your own). Lmk if you disagree and I'll double check viability of using chips instead.

How should a reviewer test this change?

Make some print usages, try to slice them with queries.

How can success be measured?

Who should look at this?

Tested? Documented?

prout-bot commented 1 year ago

Seen on auth, cropper, media-api (merged by @andrew-nowak 9 minutes and 46 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on collections (merged by @andrew-nowak 9 minutes and 52 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on metadata-editor, usage (merged by @andrew-nowak 9 minutes and 56 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on leases (merged by @andrew-nowak 10 minutes and 2 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on image-loader, thrall, leases (merged by @andrew-nowak 10 minutes and 2 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on kahuna (merged by @andrew-nowak 10 minutes and 6 seconds ago) Please check your changes!

prout-bot commented 1 year ago

Seen on kahuna (merged by @andrew-nowak 10 minutes and 7 seconds ago) Please check your changes!