Page MenuHomePhabricator

Suggest case insensitive results when searching for categories to add
Open, LowestPublicFeature

Description

lowercase afc

  • log in to http://en.wikipedia.beta.wmflabs.org
  • enable visual editor, if not already enabled
  • go to any page
  • edit it using visual editor
  • click the hamburger icon
  • click categories
  • categories screen opens
  • type this into text box: AFC
  • two matching categories are found (so far so good)
  • type this into text box: afc
  • I was expecting the same result as I got for AFC
  • but not matching categories were found
  • see attached screen shots

Version: unspecified
Severity: enhancement

Attached:

lowercase.png (821×1 px, 183 KB)

Details

Reference
bz57302

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:27 AM
bzimport set Reference to bz57302.

Created attachment 13851
uppercase AFC

Attached:

uppercase.png (821×1 px, 185 KB)

This would require a change to the MW core API module...

(In reply to Alex Monk from comment #2)

This would require a change to the MW core API module...

Hence "low". :-)

Jdforrester-WMF renamed this task from VisualEditor: Suggest case insensitive results when searching for categories to add to Suggest case insensitive results when searching for categories to add.Jan 23 2015, 10:19 PM
Jdforrester-WMF removed Krenair as the assignee of this task.
Jdforrester-WMF lowered the priority of this task from Low to Lowest.
Jdforrester-WMF moved this task from TR6: Visual diffs to Freezer on the VisualEditor board.
Jdforrester-WMF set Security to None.

It is a strange behaviour because we attempt it works like article searching.
The article search engine has been currently improved to became more and more flexible. Whereas the category search engine is very strict.

Is it not possible to use the article search engine with (invisible) category: prefix instead ?

AlexMonk-WMF subscribed.

Is it not possible to use the article search engine with (invisible) category: prefix instead ?

Wouldn't that search for pages in the category namespace, rather than actual categories? Some categories don't have associated pages, and you can create pages in the category namespace for non-existent categories.

Peternybor raised the priority of this task from Lowest to Medium.Nov 3 2017, 1:56 PM

Can this issue be fixed?

Deskana lowered the priority of this task from Medium to Lowest.Nov 3 2017, 2:16 PM
Deskana subscribed.

Please only change task priority if you are responsible for the project in question.

Can this issue be fixed?

This will not be worked on by the Editing team any time soon. As mentioned above, it is a technically challenging project which involves changing MediaWiki core, and the task is not important enough to warrant that amount of effort.

If someone else wishes to work on it, they are welcome to.

To clarify:

  • Our regular search feature (aka "prefix index"), used for the main search field and used for the input field when creating an article link, is case-insensitive in most cases. On Wikimedia wikis this comes from CirrusSearch. On other wikis (and on WMF until recently) this was provided by the TitleKey extension. The search feature has a namespace filter as well. Which would allow us to do case-insensitive search of page titles in the Category namespace.
  • The API for category names is not based on wiki pages existing in the Category namespace. For the same reason that our API for user names is not based on wiki pages in the User namespace. Categories, just like Users, can all exist without there being a description page for them per se.

In order to be able to have case-insensitive search for category names, as well as other normalisation features, we'd need to build a separate search index based on the category table. Or we could maybe hack something up in the current API that combines results from the wikipage search index for the case where a description page does happen to exist - however, it'll be quite difficult to combine those results in a meaningful way. Not to mention paging (page 2, page 3), and query performance (double the number of backend queries).

Is it not possible to use the article search engine with (invisible) category: prefix instead ?

Wouldn't that search for pages in the category namespace, rather than actual categories? Some categories don't have associated pages, and you can create pages in the category namespace for non-existent categories.

Do we have stats? How many categories don’t have a description page? How many pages in Category: namespace are not expected to be categories?
Plus, are these cases normal cases or just rarely issues which are expected to be fixed on wikis?

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:14 AM

Current engine:

  • finds “wanted categories“ (listed by Special:WantedCategories).
  • does not find “unused categories” (listed by Special:UnusedCategories).
  • is wrongly case sensitive.

Namespace-prefix page engine:

  • would find unused categories.
  • would be case insensitive.
  • would not find wanted categories.

Technically a category “exists” if any page links it.
However, for end users, a category “exists” if a category page has been created.

@Editing-team, do we really need to open a RFC to demonstrate a namespace-prefixed page engine would better satisfy editor needs?