Page MenuHomePhabricator

Make search work with remote properties (wbsearchentities)
Closed, ResolvedPublic5 Estimated Story Points

Description

We need to make it possible to search for a federated property in the property input field when adding new statements.

BDD
Scenario: Federated properties are enabled and I am manually adding a statement to a local item
Given I have selected +add statement on the item page
When I enter the federated property label or Pxx in property input field
Then federated properties appear in the results list for me to select from

The url field in the wbsearchentities response will for now contain the url of the property on the source wiki, but we make this configurable in case we want to change it to the url of the local representation of the federated property (= "shadow page") in the future.

Related Objects

Event Timeline

Samantha_Alipio_WMDE renamed this task from Make search work with remote properties (wbsearch entities) to Make search work with remote properties (wbsearchentities).Mar 3 2020, 1:51 PM
Samantha_Alipio_WMDE updated the task description. (Show Details)
Samantha_Alipio_WMDE updated the task description. (Show Details)

Change 577318 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] Decouple SearchEntities from PropertyDataTypeLookup

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

So, we had a call today and decided to split this up in a slightly different way using an abstraction that already exists in WIkibase, EntitySearchHelper.

The new tasks will roughly be:

  • Remove the property data type "stuff" that shouldn't be in SearchEntities, directly, and put it somewhere else.
  • Alter SearchEntities to use EntityTitleLookup::getTitlesForIds (batched lookup) insead of getTitleForId
  • Implement an EntityTitleLookup that is backed by an API
  • Implement an EntitySearchHelper that is backed by an API
  • Override the entity services for property with those written here and it should "just work" (tm)