Addshore added a comment.
So this is currently using action=query and list=search. For example: 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#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 we should probably bounce any change like this back to product (I'll write a ticket), for now I figure the current approach will do :) TASK DETAIL https://phabricator.wikimedia.org/T196165 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Silvan_WMDE, Addshore Cc: hoo, EBernhardson, TJones, dcausse, Ladsgroup, Silvan_WMDE, Addshore, Bencemac, Aklapper, Ayack, Liuxinyu970226, Smalyshev, Lydia_Pintscher, Lea_Lacroix_WMDE, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
