Page MenuHomePhabricator

incategory:"xyz" search method for category intersections not unicode compatible
Closed, InvalidPublic

Details

Reference
bz42416

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:56 AM
bzimport set Reference to bz42416.
bzimport added a subscriber: Unknown Object (MLST).

I originally assumed this was due to using the translation of the category namespace (under the assumption that lucene has "category" hard coded) but this doesn't seem to work even for categories that use "category" as the namespace name in the link.

I'm not able to reproduce this bug as described. Assume we have two categories:

  • [[:Category:Aikoku Kōtō politicians]]
  • [[:Category:1874 deaths]]

Using the incategory search feature:

https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=incategory%3A%22Aikoku+K%C5%8Dt%C5%8D+politicians%22&fulltext=Search

This search properly shows four results.

https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=incategory%3A%221874+deaths%22&fulltext=Search

This search properly shows approximately 780 results.

https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=incategory%3A%22Aikoku+K%C5%8Dt%C5%8D+politicians%22+incategory%3A%221874+deaths%22&fulltext=Search

This is a category intersection of these two categories. It properly shows one result ([[Etō Shimpei]]).

(In reply to comment #0)

The incategory:"xyz" method of finding category intersections doesn't seem to
work with unicode.

I tried using the method with one category [1] and two categories [2] on hi-wp,
but it didn't work. [1] did show three results (but at the time of search the
category contains 1700+ articles).

It seems to work at en-wp with both one [3] and multiple categories [4].

I think your test cases are flawed. You seem to have run a bot ("Siddhartha Ghai bot"; cf. https://hi.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:%E0%A4%AF%E0%A5%8B%E0%A4%97%E0%A4%A6%E0%A4%BE%E0%A4%A8/Siddhartha_Ghai_bot) on November 24, 2012 updating a particular category name. On November 24, 2012, you also filed this bug.

The "incategory" feature relies on Lucene search's index of the wikitext of each individual page. This index is updated approximately every 24 hours. You should wait a day or two to see if the problem still persists. My suspicion is that the index simply hasn't updated yet. I'd be surprised if Lucene didn't support Unicode categories (cf. comment 2).

https://hi.wikipedia.org/w/index.php?title=विशेष%3Aखोज&profile=default&search=incategory%3A%22आन्ध्र+प्रदेश%22 seems to work as expected, showing 4,668 results for Category:आन्ध्र प्रदेश.

https://hi.wikipedia.org/w/index.php?search=incategory%3A%22कृष्णा+जिला%22&title=विशेष%3Aखोज similarly correctly shows 955 results for Category:कृष्णा जिला.

The intersection of these categories shows 955 results: https://hi.wikipedia.org/w/index.php?title=विशेष%3Aखोज&profile=default&search=incategory%3A%22कृष्णा+जिला%22+incategory%3A%22आन्ध्र+प्रदेश%22&fulltext=Search&searchengineselect=mediawiki.

There seems to be a separate issue where the incategory feature is not always returning results properly. This seems like mis-synchronized search indices. I'll file a separate bug about this.

As far as I can see, this bug is invalid.

(In reply to comment #3)

There seems to be a separate issue where the incategory feature is not always
returning results properly. This seems like mis-synchronized search indices.
I'll file a separate bug about this.

Filed as bug 42423.

You should wait a day or two to see if the problem still persists.

Siddhartha: Is this still a problem?

(In reply to comment #5)

You should wait a day or two to see if the problem still persists.

Siddhartha: Is this still a problem?

Uh, no. Seems like it was my mistake in the first place. Thanks to MZMcBride for pointing it out in Comment 3.