Page MenuHomeSoftware Heritage

Implement blocklist support in swh.search
Closed, ResolvedPublic

Description

After taking down an origin, we need it to disappear from search results, even if it gets a new visit after the fact (at least, until an administrator can review that the content can re-appear). So we need to implement some sort of sticky blocklist within swh.search.

Event Timeline

olasd changed the task status from Open to Work in Progress.Apr 8 2021, 4:55 PM
olasd triaged this task as High priority.
olasd created this task.

This has now been deployed and tested in staging with a canary origin (github.com/olasd/Pythagore). Time to deploy in production.

And this is now available in production.

To blocklist an origin:

from swh.search import get_search

s = get_search(cls='remote', url='http://search0.internal.staging.swh.network:5010')
s.origin_update([{"url": "https://github.com/olasd/Pythagore", "blocklisted": True}])