Create a special ug_sources
parameter for use in integrations
#3421
Labels
💻 aspect: code
Concerns the software code in the repository
✨ goal: improvement
Improvement to an existing user-facing feature
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: api
Related to the Django API
Problem
Currently we exclude some sources from the Openverse integrations. The sources list can change over time, and updating it everywhere can be tedious and time-consuming.
Description
Create a special value for the
source
parameter,ug_sources
(user-generated sources, looking for a better name), that would be set in the API layer to the sources that are user-generated and should be filtered out to ensure that the API returns non-sensitive results. Thebuild_search_query
would then convert this special parameter to a list of the sources that we have marked as sources to filter out from integrations.Alternatives
Update the integrations individually. This would be tedious and would require much more work for updates.
Additional context
This change could also improve the query performance because currently the integrations use a very long list of sources in filters.
The text was updated successfully, but these errors were encountered: