Web team is trying to use the /search/title endpoint, but they're getting different results than they expect. We need to determine the right results for them.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T49145 Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core | |||
Open | None | T100270 Replace use of jQuery UI and MW UI with OOUI across all Wikimedia-deployed extensions and core | |||
Open | None | T85394 Use OOUI suggestions/autocompletion components only (instead of jquery.suggestions, jquery.ui.autocomplete) | |||
Open | None | T125725 [epic] Update autocomplete search box with metadata and remove and delete the old searchSuggest system | |||
Resolved | ovasileva | T244392 [GOAL] Deploy the new Vue.js search experience | |||
Resolved | Volker_E | T249299 [Epic] Build the new Vue.js search experience | |||
Resolved | phuedx | T244287 Build the Vue.js search component network client | |||
Resolved | • holger.knust | T258736 Core REST API search results are different from Action API results |
Event Timeline
Results for "jupiter" as returned by the Action API
[ "Jupiter", "Jupiter (mythology)", "Jupiter Ascending", "Jupiter, Florida", "Jupiter's moons in fiction", "Jupiter's Legacy (comic)", "Jupiter trojan", "Jupiter Icy Moons Explorer", "Jupiter Award (film award)", "Jupiter Apple" ],
Results returned by the REST API search/title endpoint match the results from the Action API. Larger result sets appear to match as well (spot checked)
"Jupiter" "Jupiter (mythology)" "Jupiter Ascending" "Jupiter, Florida" "Jupiter's moons in fiction" "Jupiter's Legacy (comic)" "Jupiter trojan" "Jupiter Icy Moons Explorer" "Jupiter Award (film award)" "Jupiter Apple"
Results returned by the REST API search/page endpoint
"Jupiter" "Jupiter (mythology)" "Moons of Jupiter" "Jupiter Ascending" "Jupiter trojan" "Sailor Jupiter" "Jupiter, Florida" "Jupiter (disambiguation)" "Ganymede (moon)" "Return to Jupiter"
The results from the page endpoint differ after the third row. Do we need to look into why the search strategies differ?
Thank you, @holger.knust!
@ovasileva, @alexhollender, my understanding is that we will be replicating the existing search suggestion behavior of searching by title. When a user presses "search pages containing", they will simply be routed to Special:Search, correct?
I don't think I fully understand what this means but it sounds right
When a user presses "search pages containing", they will simply be routed to Special:Search, correct?
Yes
Closing this since there is nothing to be done at this point. Please reopen if additional work is required.
I found another difference between the REST API and the Action API. This time in the description field. The REST API seems to prefer the central description, while I think it should prefer the local description instead.
REST API: https://en.wikipedia.org/w/rest.php/v1/search/title?q=media&limit=1 ->
"description": "Wikimedia disambiguation page"
Action API (default): https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=description&titles=Media ->
"description": "Disambiguation page providing links to topics that could be referred to by the same search term", "descriptionsource": "local"
Action API (prefering central description) : https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=description&titles=Media&descprefersource=central ->
"description": "Wikimedia disambiguation page", "descriptionsource": "central"
The local description is now being served in https://en.wikipedia.org/w/rest.php/v1/search/title?q=media&limit=1 ("Disambiguation page providing links to topics that could be referred to by the same search term")