Last modified: 2014-10-07 07:44:57 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 T40785, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38785 - mediawiki.api: Implement support for case-insensitive prefix search in getCategoriesByPrefix()
mediawiki.api: Implement support for case-insensitive prefix search in getCat...
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 27312
  Show dependency treegraph
 
Reported: 2012-07-29 08:04 UTC by matanya
Modified: 2014-10-07 07:44 UTC (History)
9 users (show)

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


Attachments

Description matanya 2012-07-29 08:04:58 UTC

    
Comment 1 matanya 2012-07-29 08:08:52 UTC
I wrote a comment, but it failed to upload from some reason, re-submitting:

When one add a category through upload wizard category adder, it give some suggestion (using hot-cat style). Though, when try to add something like: 
Professors from israel, the suggestion stops at the i since the category's name is Professors from Israel. Would be moew user-friendly to suggest the right category name and if choosen, uppercase or lowercase as needed.
Comment 2 Mark Holmquist 2012-07-30 15:59:07 UTC
Hi there!

We accomplish this using the mw.api.getCategoriesByPrefix [0] function. Until that function has this capability, this is not a UW bug, it's upstream. Sorry!

[0] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/mediawiki.api/mediawiki.api.category.js;h=c8c18e69fa69302e731ccea9ec1fa5eb48d99ce8;hb=master#l43

Recategorizing.
Comment 3 Mark Holmquist 2012-07-30 16:00:40 UTC
OK, that clearly didn't work. Here: http://tinyurl.com/c4542wm
Comment 4 Krinkle 2012-07-31 09:01:57 UTC
The mediawiki.api module is just a convenience wrapper in javascript around jQuery.ajax and the server-side api.php. Features such as case-insensitive search require much deeper integration:

* (massive) Database indexes for searching
* then (easy) support in the api.php module for allpages/prefix

mediawiki.api.category would transparently start working (or if needed, pass a simple parameter to trigger it)
Comment 5 Krinkle 2012-07-31 09:03:46 UTC
Rephrasing bug to represent the original use case.

Implementation could vary. Implementing case-insensitive prefix search in allpages would require a huge database index probably.

Another solution would be to make mw.Api.getCategoriesByPrefix() make use of ApiOpenSearch (action=opensearch) which (if TitleKey is installed, which it is on Wikimedia) supports case-insensitive search.
Comment 6 Marco 2014-01-02 12:14:26 UTC
I am not sure if this is low-enhancement because reports of unpleased users are popping up:
https://commons.wikimedia.org/w/index.php?oldid=113075033#Category_selection
Importance: Normal-normal (Of course you are free to revert me)

Also: Hotcat supports this feature. I could not find the line in the source code but it may be possible to steal it.

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


Navigation
Links