- Do what we did for T391663
Description
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Ifrahkhanyaree_WMDE | T388209 💡 Create simple item prefix search endpoint | |||
| Resolved | Dima_Koushha_WMDE | T396569 💡 Handle ID/URL matches |
Event Timeline
Comment Actions
Both ID and URL matches are already handled by the EntitySearchHelperPrefixSearchEngine, and there is end-to-end test covering this case.
GET http://default.mediawiki.mwdd.localhost:8080/w/rest.php/wikibase/v0/suggest/items?q=http%3A%2F%2Fdefault.mediawiki.mwdd.localhost%3A8080%2Fwiki%2FItem%3AQ1&language=%3F
{
"results": [
{
"id": "Q1",
"display-label": {
"language": "en",
"value": "Potato"
},
"description": null,
"match": {
"type": "entityId",
"text": "Q1"
}
}
]
}
GET http://default.mediawiki.mwdd.localhost:8080/w/rest.php/wikibase/v0/suggest/items?q=Q1&language=%3F
{
"results": [
{
"id": "Q1",
"display-label": {
"language": "en",
"value": "Potato"
},
"description": null,
"match": {
"type": "entityId",
"text": "Q1"
}
},
{
"id": "Q4",
"display-label": {
"language": "en",
"value": "q1"
},
"description": null,
"match": {
"type": "label",
"language": "en",
"text": "q1"
}
}
]
}