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.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterAdd props parameter to SearchEntities API module
mediawiki/extensions/Wikibase : masterwbsearchentities: Make returning the entity URL optional
mediawiki/extensions/Wikidata : masterWikidata: wbsearchentities: Make returning the entity URL optional

Event Timeline

daniel created this task.Jun 25 2015, 5:24 PM
daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a subscriber: daniel.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 25 2015, 5:24 PM
daniel set Security to None.
Restricted Application added a project: Wikidata. · View Herald TranscriptJun 25 2015, 5:25 PM

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 bug.
JanZerebecki moved this task from incoming to ready to go on the Wikidata board.Sep 10 2015, 8:37 PM
Addshore updated the task description. (Show Details)Dec 4 2015, 12:48 PM
Addshore added a project: Google-Code-In-2015.

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 26 2016, 3:04 PM

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJul 12 2017, 12:05 AM

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

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

Lydia_Pintscher closed this task as Resolved.Jul 12 2017, 2:35 PM