[Bug 73623] Inconsistent search results when combining list=search and generator=search
| Newsgroups | gmane.org.wikimedia.mediawiki.bugs |
|---|---|
| Message-ID | <[email protected]/> |
https://bugzilla.wikimedia.org/show_bug.cgi?id=73623 Matthew Flaschen <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #13 from Matthew Flaschen <[email protected]> --- (In reply to Nik Everett from comment #12) > OK. I'm not working on that now because I don't think it's as bad. Also I > don't understand our API too well so I'd have to do some research. I don't > even know enough to know if the bug is in CirrusSearch. The general idea is that lists return results directly, and generators use the output of a list to feed into another module (like a UNIX pipe). So generators essentially are the intended way to combine modules in one query like this. The problem is for some reason list= is also used/necessary in this case. See https://www.mediawiki.org/wiki/API:Query#Generators (In reply to Monte Hurd from comment #8) > Here is the exact query the iOS app used for those two screenshots: > > https://en.m.wikipedia.org/w/api. > php?action=query&format=json&generator=prefixsearch&gpslimit=24&gpsnamespace= > 0&gpssearch=fish&list=prefixsearch&pilimit=24&piprop=thumbnail&pithumbsize=14 > 4&ppprop=wikibase_item&prop=pageprops%7Cpageimages&pslimit=24&pssearch=fish I notice this does not use indexpageids. So you're only getting it in the correct order if whatever iOS JSON parser you're using preserves order in hashes/associative arrays (possible, but not certain). See https://en.m.wikipedia.org/w/api.php?action=query&format=jsonfm&generator=prefixsearch&gpslimit=24&gpsnamespace=0&gpssearch=fish&list=prefixsearch&pilimit=24&piprop=thumbnail&pithumbsize=144&ppprop=wikibase_item&prop=pageprops|pageimages&pslimit=24&pssearch=fish&indexpageids for a version with indexpageids with a clear array of results. Also, it's using generator=prefixsearch not generator=search (which comment #0 mentions). -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l