Page MenuHomePhabricator

Show the correct concept URI in search results
Closed, ResolvedPublic

Description

With T286916, T286917, and T287249 done wbsearchentities finds the expected results, but does not show the right concepturi.

Example output from my local machine that shows a local property result with the concept URI that is defined for my federated property entity source:

{
    "searchinfo": {
        "search": "i'm a"
    },
    "search": [
        {
            "id": "P14",
            "title": "Property:P14",
            "pageid": 73,
            "url": "http://default.web.mw.localhost:8080/mediawiki/index.php?title=Property:P14",
            "datatype": "url",
            "concepturi": "http://wikidata.beta.wmflabs.org/entity/P14",
            "label": "i'm a local prop",
            "match": {
                "type": "label",
                "language": "en",
                "text": "i'm a local prop"
            }
        }
    ],
    "success": 1
}

ConceptUriSearchHelper::getConceptBaseUri looks suspicious and should probably use EntitySourceLookup instead of entitySourceDefinitions->getSourceForEntityType().

Event Timeline

Change 708732 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/WikibaseCirrusSearch@master] Temporarily skip test for compatibility

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

Change 708749 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] FP: use EntitySourceLookup in SearchEntities

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

Change 708754 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] FP: Show the correct concept URI in search results

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

Change 708759 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] FP: add and use WikibaseRepo.EntitySourceLookup service

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

Change 708759 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] FP: add and use WikibaseRepo.EntitySourceLookup service

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

Change 708732 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Temporarily skip test for compatibility

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

Change 708749 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] FP: use EntitySourceLookup in SearchEntities

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

Change 708754 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] FP: Show the correct concept URI in search results

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