Last modified: 2009-01-16 11:08:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11143, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9143 - api.php opensearch returns only JSON
api.php opensearch returns only JSON
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-01 20:34 UTC by Josh Hight
Modified: 2009-01-16 11:08 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Josh Hight 2007-03-01 20:34:41 UTC
Querying api.php using opensearch action returns only JSON responses and sends a
header that causes browsers to download the response as if it were a file. The
format parameter is ignored. Using opensearch should return the response in
xfhtml by default, like other actions, or return the response in a format
specified. The header forcing download should be removed.

Try for yourself:
http://en.wikipedia.org/w/api.php?action=opensearch&search=Te
Comment 1 Andrew Garrett 2007-03-19 05:04:01 UTC
OpenSearch implementation in api.php is just that - an implementation of the
OpenSearch standard, which specifies the behaviour you've identified.

WONTFIX.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-20 00:54:41 UTC
From skimming the protocol it appears that any formatting is permitted for the response:

http://www.opensearch.org/Specifications/OpenSearch/1.1

No?  The term "JSON" doesn't even appear in the spec.
Comment 3 Josh Hight 2007-03-21 14:38:52 UTC
OpenSearch has nothing to do with JSON, directly. That spec gives an example of
an RSS/Atom OpenSearch response, for example.

Any idea when this will get out of WONTFIX status?
Comment 4 Robert Leverington 2007-03-21 15:31:03 UTC
Generally WONTFIX means something will *never* be implemented.
Comment 5 Rob Church 2007-03-21 20:04:28 UTC
(In reply to comment #4)
> Generally WONTFIX means something will *never* be implemented.

This bug should not have been marked WONTFIX, however, per Simetrical in comment
2 - the developer closing the bug failed to read the documentation.
Comment 6 Yuri Astrakhan 2007-05-19 02:16:54 UTC
Please do not confuse the open search protocol (used by search engines + clients), and the specific suggestions type  application/x-suggestions+json

That document does not define suggestions format. Google + Firefox & IE have been using it in the exact form as implemented by action=opensearch.

I think the biggest problem is the name -- this is not open search but open search suggestions action. (a bit too long for my taste though).

On the other hand, this action can be improved to allow for query history or any other features implemented. But first, the protocol will need to be defined, and i couldn't find anything specific yet.

Some References:

Mozila:
http://developer.mozilla.org/en/docs/index.php?title=Supporting_search_suggestions_in_search_plugins

Multiple formats discussion (includes an interesting idea for returning last user's queries together with the results):
http://lists.opensearch.org/pipermail/opensearch-discuss/2007-March/000059.html

Yahoo search suggest uses a format argument (they apparently are using a similar API interface model):
http://wiki.mozilla.org/Firefox2/L10n_Requirements#Yahoo_Search_Suggest

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links