Page MenuHomePhabricator

Gerrit search does not treat space as AND operator like most search engines do
Open, MediumPublicBUG REPORT

Description

Upstream https://bugs.chromium.org/p/gerrit/issues/detail?id=15157


List of steps to reproduce (step by step, including full links if applicable):

What happens?:
Somehow, Gerrit fails to filter for multiple words. My guess: it tries to exactly match "mediawiki skins" which, due to it containing a space character, doesn't match any repo URL. Notably, that *does* match one repository's description (mediawiki/skins whose description is "MediaWiki skins!") but Gerrit fails to capture that either.

What should have happened instead?:
All repos with the words "mediawiki" and "skins" in their URLs or Description should be listed.

**Implications (why is this a bad thing? who is impacted by it negatively?)
An inexperienced user who is trying to install MediaWiki for the first time will notice that Vector skin is missing. The user will likely follow the MediaWiki.org documentation to get to https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins where there is a link to "List of skins in git" which links to https://gerrit.wikimedia.org/r/admin/repos/q/filter:mediawiki+skins and that link does *not* lead the user to Vector's git URL. The user may not find the way to install Vector from Git.

**Other relevant information
Obviously, changing the filter to "mediawiki/skins" would be an easy workaround to implement. But it might be better to file an usptream issue with Gerrit and track it here regardless, particularly because the search in Description seems to be broken too.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Gerrit 3.3.6

Event Timeline

hashar triaged this task as Medium priority.Oct 11 2021, 9:24 AM
hashar added a project: Upstream.
hashar subscribed.

Went to https://gerrit.wikimedia.org/r/admin/repos/q/filter:mediawiki+skins and the web interface does an API requests to https://gerrit.wikimedia.org/r/projects/?n=26&S=0&query=inname:mediawiki AND inname:skins which is described at https://gerrit.wikimedia.org/r/Documentation/rest-api-projects.html

ParameterValueDescription
n26Limit number of projects returned
S0Skip the given number of projects from the beginning of the list.
queryinname:mediawiki AND inname:skinsA search query ( https://gerrit.wikimedia.org/r/Documentation/user-search-projects.html )

The API requests does return 26 projects:

"id": "mediawiki%2Fextensions%2Fskins",
"id": "mediawiki%2Fskins",
"id": "mediawiki%2Fskins%2FAmethyst",
"id": "mediawiki%2Fskins%2FAnisa",
"id": "mediawiki%2Fskins%2FAthena",

But somehow the web view does not display any.

I have filed a bug upstream https://bugs.chromium.org/p/gerrit/issues/detail?id=15157

hashar updated the task description. (Show Details)