Page MenuHomePhabricator

Implement the random item service
Closed, ResolvedPublic

Description

/random endpoint, should behave pretty much as v1, i.e., returning suggestions for a random QID.
See https://tools.wmflabs.org/wikidata-primary-sources/entities/any

Event Timeline

Hjfocs moved this task from Doing to Done on the Wikidata-primary-sources board.

Uses a caching mechanism for subjects items (QIDs) to ensure efficiency.
The cache gets updated in 2 different ways:

  1. dataset-specific, in case of an operation on the Ingestion API, e.g., when a new dataset is uploaded;
  2. database-wide, runs with a fixed schedule.

N.B.: the database-wide update is not bound to the Curation API, as it would heavily affect approval/rejection of statements. This means that the cache is not 100% accurate.