Page MenuHomePhabricator

CirrusSearch deep category search appears to hit limit arbitrarily.
Closed, DeclinedPublic

Description

Hello. I am a regular user of the English Wiktionary. I wanted to note that, when trying to use the advanced search function to search only words in the category Category:English lemmas, I suddenly get the error message "A warning has occurred while searching: Deep category query returned too many categories".

I have used the advanced search feature to search for words that are in this category many times before, but suddenly it no longer works, spitting out that error message. Another Wiktionary user has confirmed this bizarre seeming bug.

The other user in question, an administrator on Wiktionary, noted that there do not appear to be any more subcategories that have been added (per the Recent Changes list) that would have made the feature no longer work for this category.

With that said, attempting the same advanced search with Category:English adjectives results in search results as normal. So I'm not sure what is going on here.

Category:English lemmas has fifteen subcategories, so you know.

Event Timeline

Tharthan updated the task description. (Show Details)

The error message in question is generated at https://github.com/wikimedia/mediawiki-extensions-CirrusSearch/blob/master/includes/Query/DeepcatFeature.php#L218
The default value for $wgCirrusSearchCategoryMax is 256, I can't see it overridden anywhere.
It looks like the next place to look is the sparql service that generates the list of categories and see what's going on.

Executing the related query for English_lemmas i get 1300 categories: https://phabricator.wikimedia.org/P12210

As for what changed, we've been having some data quality issues with this service recently (T246568), it might be possible the results were previously incomplete and are now returning more? Alternatively a single link could have been made that brought hundreds of new categories into the tree.

If there are only 15 subcategories, where do the other categories come from? Can to elaborate a little on how other categories get into the tree and returned in the list?

Thanks, that was the missing link ( :-P ) for me!

Well, that's very unfortunate. It was very useful to be able to search that category, and made a lot of things that I needed to do a whole lot easier.

So if it was a bug this whole time that allowed me to search it before, then that had certainly been a 'good bug' for me.

Thanks for looking into this, anyhow.

Closing because this is working as designed - but if you'd like to submit a feature request to address the core issue, please do.