Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata wb_terms Trailblazing, Wikidata.
TASK DESCRIPTION
The current `TermIdsResolver` can only be used to resolve the terms of a
single entity, otherwise you don’t know which terms in the return value belong
to which entity. We want to introduce some other service with input and output
like the following:
[ 'Q123' => [ 0, 1, 2 ], 'Q456' => [ 7, 8 ] ]
⇒
[
'Q123' => [
'label' => [ 'en' => [ 'some label' ] ],
'alias' => [ 'en' => [ 'some alias' ], 'de' => [ 'noch ein Alias' ] ],
],
'Q456' => [
'label' => [ 'en' => [ 'a label' ], 'de' => [ 'eine Beschriftung' ] ],
],
]
It doesn’t need to know what the keys mean, it just preserves the association
between the keys and the terms / term IDs – while ideally still retrieving all
the terms, for all the keys, in bulk. (Though a simple implementation can of
course iterate over the top-level array and call
`TermIdsResolver::resolveTermIds` separately each time.)
Could be part of `TermIdsResolver` (either as an additional method or even
replacing the current `resolveTermIds`) or a separate interface; in either
case, though, the database implementation should be in
`DatabaseTermIdsResolver`, not some other class.
TASK DETAIL
https://phabricator.wikimedia.org/T225000
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: hoo, alaa_wmde, Aklapper, Lucas_Werkmeister_WMDE, darthmon_wmde,
Premeditated, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer,
_jensen, rosalieper, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs