Addshore created this task. Addshore added projects: Wikidata-Campsite, Wikidata. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION Created as a small potential followup after T196165 <https://phabricator.wikimedia.org/T196165> Currently our commons media file search uses action=query and list=search and ends up with results such as: https://commons.wikimedia.org/w/api.php?callback=jQuery34107062500487253558_1582096853620&action=query&list=search&srsearch=Barcelonnette%20-%20Villa%20du%20Parc%20du%20Mercantour%20-985.jpg&srnamespace=6&srlimit=10&format=json&_=1582096853622 In T196165 <https://phabricator.wikimedia.org/T196165> there was a desire to always have exact matches at the top of results, and that has been completed, but near the end of the task @dcausse proposed another improvement that we might want to make. In T196165#5890294 <https://phabricator.wikimedia.org/T196165#5890294>, @dcausse wrote: > In general I suggest using autocomplete APIs (opensearch/prefixsearch) for type-a-head searches, this is faster and the list of results does no change unexpectedly as you type. What's done in the mobile app is a two steps search: first send a prefixsearch then a fulltext search if not results are found. The mobile app seems to make queries such as: ?format=json&formatversion=2&errorformat=plaintext&action=query&redirects=&converttitles=&prop=description|pageimages|info&piprop=thumbnail&pilicense=any&generator=prefixsearch&gpsnamespace=0&list=search&srnamespace=0&inprop=varianttitles&srwhat=text&srinfo=suggestion&srprop=&sroffset=0&srlimit=1&pithumbsize=320&gpssearch=Barcelonnette&gpslimit=20&srsearch=Barcelonnette ?format=json&formatversion=2&errorformat=plaintext&action=query&converttitles=&prop=description|pageimages|pageprops|info&ppprop=mainpage|disambiguation&generator=search&gsrnamespace=0&gsrwhat=text&inprop=varianttitles&gsrinfo=&gsrprop=redirecttitle&piprop=thumbnail&pilicense=any&pithumbsize=320&gsrsearch=Barcelonnette&gsrlimit=20 For our search the examples would be: https://commons.wikimedia.org/w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&redirects=&converttitles=&prop=description|pageimages|info&piprop=thumbnail&pilicense=any&generator=prefixsearch&gpsnamespace=6&list=search&srnamespace=6&inprop=varianttitles&srwhat=text&srinfo=suggestion&srprop=&sroffset=0&srlimit=1&gpssearch=Barcelonnette%20-%20Villa%20du%20Parc%20du%20Mercantour%20-985.jpg&gpslimit=20&srsearch=Barcelonnette%20-%20Villa%20du%20Parc%20du%20Mercantour%20-985.jpg https://commons.wikimedia.org/w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&converttitles=&prop=description|pageimages|pageprops|info&ppprop=mainpage|disambiguation&generator=search&gsrnamespace=6&gsrwhat=text&inprop=varianttitles&gsrinfo=&gsrprop=redirecttitle&piprop=thumbnail&pilicense=any&pithumbsize=320&gsrsearch=Barcelonnette%20-%20Villa%20du%20Parc%20du%20Mercantour%20-985.jpg&gsrlimit=20 Might lead to a slight change in behaviour so this is essentially up to product to decide. A single one of the new API calls also seems to tak 60-100ms longer than the older API call. TASK DETAIL https://phabricator.wikimedia.org/T245589 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore Cc: Lydia_Pintscher, Addshore, dcausse, Aklapper, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs