Add repository name to TermIndexEntry
Closed, DeclinedPublic

Description

A constructor of TermIndexEntry should allow to specify repository name, and there should be getter/setter for the repository name. Value of the field will not be stored in the database.

Having this field added would allow to use foreign entities in search.

This would involve extending ItemId::newFromNumber and PropertyId::newFromNumber to also accept repository name as a parameter (empty/null by default).

WMDE-leszek updated the task description. (Show Details)Nov 21 2016, 4:23 PM
WMDE-leszek moved this task from Proposed to Doing on the Wikidata-Former-Sprint-Board board.

Change 322704 had a related patch set uploaded (by WMDE-leszek):
Add repository name to TermIndexEntry

https://gerrit.wikimedia.org/r/322704

Change 323141 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
[DNM] Add repository parameter to entity-id-composer callbacks

https://gerrit.wikimedia.org/r/323141

WMDE-leszek closed this task as Declined.Nov 28 2016, 8:24 AM

Given the change described in T151212 this task is not really valid any more. TermIndexEntry::getEntityId (still) returns the actual entity id instance (which can be asked for the repository name), and TermIndexEntry's constructor now expects the actual EntityId object (including relevant repository prefix!), not just a number. Based on this change it is now possible to create TermIndexEntry objects for foreign entity ids etc.
Convenience getter returning the repository name of the related EntityId object can still be added to TermIndexEntry if needed.

Change 322704 abandoned by WMDE-leszek:
Add repository name to TermIndexEntry

Reason:
I2819090b4759fa1281fcc570b9feb42122ae2442 makes this patch not needed

https://gerrit.wikimedia.org/r/322704

Change 323141 merged by jenkins-bot:
Add repository parameter to entity-id-composer callbacks

https://gerrit.wikimedia.org/r/323141