Page MenuHomePhabricator

[Task] wbsearchentities: Make returning the entity URL optional
Closed, ResolvedPublic

Description

Currently, wbsearchentities always returns the full URL for each matched entity. Determining the URL is potentially expensive, and not always needed, so it should be optional (and perhaps off per default).

A parameter could be added to getAllowedParams, perhaps called props. Its default value would be an empty array, one possible value would be "url".
The URL is added to the result by $title->getFullUrl(). This should only be called if "url" is in the list of requested props.

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a subscriber: daniel.

Is this actually related to Wikibase-Quality?

This should be a very easy change, potentially we could add a props param, defaults to nothing and currently the only option would be "url".

Any movement here would class as a breaking change and thus once the patch is prepared would need to be announce accordingly etc.

Addshore renamed this task from wbsearchentities: Make returning the entity URL optional to [Task] wbsearchentities: Make returning the entity URL optional.Sep 3 2015, 7:54 AM
Addshore triaged this task as Low priority.
Addshore added a project: good first task.

I will mentor this task for GCI 2015

Change 258679 had a related patch set uploaded (by PranavK):
Wikidata: wbsearchentities: Make returning the entity URL optional

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

Change 258967 had a related patch set uploaded (by PranavK):
wbsearchentities: Make returning the entity URL optinal

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

Change 258679 abandoned by PranavK:
Wikidata: wbsearchentities: Make returning the entity URL optional

Reason:
wrong repo, superseded by https://gerrit.wikimedia.org/r/#/c/258967/

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

Change 258967 abandoned by Addshore:
wbsearchentities: Make returning the entity URL optional

Reason:
abandoned GCI 2015 task

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

Change 364623 had a related patch set uploaded (by AnotherLadsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/Wikibase@master] Add props parameter to SearchEntities API module

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

Change 364623 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add props parameter to SearchEntities API module

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