Last modified: 2013-11-19 19:04:29 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 T32089, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30089 - Make SimpleSearch parameters to ApiOpenSearch configurable
Make SimpleSearch parameters to ApiOpenSearch configurable
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.21.x
All All
: Low enhancement (vote)
: 1.23.0 release
Assigned To: Nobody - You can work on this!
gci2013 https://www.mediawiki.org/wik...
: easy
Depends on:
Blocks: 27411
  Show dependency treegraph
 
Reported: 2011-07-27 21:09 UTC by Dan Barrett
Modified: 2013-11-19 19:04 UTC (History)
6 users (show)

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


Attachments

Description Dan Barrett 2011-07-27 21:09:15 UTC
The SimpleSearch search box in the Vector skin does not obey $wgMWSuggestTemplate. Instead, the opensearch string values are hard-coded in Vector/modules/ext.vector.simpleSearch.js.
Comment 1 Brion Vibber 2011-07-28 23:30:07 UTC
$wgMWSuggestTemplate (and the old MWSuggest itself) should probably be removed entirely in favor of the more modern interface that consistently uses the OpenSearch suggestions API.
Comment 2 Dan Barrett 2011-07-28 23:36:42 UTC
Thanks Brion. Would that allow wiki admins to modify the opensearch parameters (e.g., set limit=20 instead of 10)? That's the problem we're having. This was easy to do previously with $wgMWSuggestTemplate.
Comment 3 Krinkle 2011-08-11 11:07:25 UTC
It ignores wgMWSuggestTemplate because it's not MWSuggest but SimpleSearch. They are both separate scripts.

We could probably implement a configuration open for it though. Right now Vector's SimpleSearch doesn't set any hardcoded limit, it calls ApiOpenSearch without any limit, the api itself has a default limit of 10.
Comment 4 Bartosz Dziewoński 2013-02-11 18:14:31 UTC
Is this still valid? The search suggestions functionality has been reworked entirely some time ago...
Comment 5 Dan Barrett 2013-02-11 18:21:11 UTC
Is it now possible to set the length of the search box suggestion list? (That is, the number of search suggestions returned.)
Comment 6 Bartosz Dziewoński 2013-02-11 19:00:36 UTC
I've just looked and it doesn't seem so. Search suggestions script in /resources/mediawiki/mediawiki.searchSuggest.js now uses the default limit, which is set to 10 in /includes/api/ApiOpenSearch.php.

This could probably be made configurable; Dan, do you have gerrit/Labs account? You could submit a patch yourself :) [https://www.mediawiki.org/wiki/Developer_access]

[Marking bug as 'easy'.]
Comment 7 Dan Barrett 2013-02-11 19:09:51 UTC
Thanks for the offer. I do not have git access and probably should keep it that way for now. :-)  (Too busy.)
Comment 8 Quim Gil 2013-11-19 01:55:56 UTC
https://gerrit.wikimedia.org/r/#/c/96162/

For some reason the bug report hasn't been updated automatically by Gerrit.
Comment 9 Andre Klapper 2013-11-19 08:47:52 UTC
(In reply to comment #8)
> For some reason the bug report hasn't been updated automatically by Gerrit.

The commit message did not end with a line saying "Bug: 30089". 
See http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines  :)
Comment 10 Gerrit Notification Bot 2013-11-19 14:31:49 UTC
Change 96162 had a related patch set uploaded by MegaAlex:
API: Add default setting for OpenSearch limit parameter

https://gerrit.wikimedia.org/r/96162
Comment 11 Gerrit Notification Bot 2013-11-19 19:02:00 UTC
Change 96162 merged by jenkins-bot:
API: Add default setting for OpenSearch limit parameter

https://gerrit.wikimedia.org/r/96162
Comment 12 Bartosz Dziewoński 2013-11-19 19:04:29 UTC
Fixed by Alex. Thanks!

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


Navigation
Links