https://bugzilla.wikimedia.org/show_bug.cgi?id=17142
Summary: Different results from OpenSearch in JSON and XML
formats
Product: MediaWiki
Version: 1.14-svn
Platform: All
OS/Version: All
Status: NEW
Severity: trivial
Priority: Normal
Component: API
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
OVERVIEW DESCRIPTION:
The module that implements the OpenSearch protocol returns slightly different
results in JSON and XML formats (for the same search string).
STEPS TO REPRODUCE:
1.
http://en.wikipedia.org/w/api.php?action=opensearch&search=Neptune&limit=50&format=jsonfm
2.
http://en.wikipedia.org/w/api.php?action=opensearch&search=Neptune&limit=50&format=xmlfm
3. Compare the results.
ACTUAL RESULTS:
The JSON results are in strictly alphabetical order. The XML results are in
roughly alphabetical order -- redirections have been resolved, and duplicates
have been removed.
e.g. The fifth JSON result "Neptune (astrology)" corresponds to the fifth XML
result "Planets in astrology".
e.g. The sixth JSON result "Neptune (astronomy)" has been removed from the XML
results as a duplicate.
e.g. The 43rd JSON result "Neptune Emerald" (which redirects to the
"Neptune_Emerald#My-Otome_Zwei" section of the "Nina Wáng" page) has a
corresponding XML result (but without the section anchor).
The JSON results contain 50 items (as requested). The XML results contain 35
items -- after redirections, 15 duplicates were removed.
EXPECTED RESULTS:
The JSON and XML results should be consistent with each other.
The action=query and action=parse modules support a "redirects" parameter --
perhaps action=opensearch should do the same?
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l