[go: up one dir, main page]

Page MenuHomePhabricator

\s regexp does not match all spaces in cirrus search
Open, LowestPublic

Description

Try [https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*+*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*+*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 1] (2 matches) as opposed to
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*\s*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*\s*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 2] (1 match). the only difference is that the first uses ' *' to match spaces, while the second uses '\s*' to match spaces. The second regexp should yield at least the same number of matches as the fist regexp, as a space is always matched by \s (all whitespace). What is wrong here?

Simpler version with same behaviour:
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\|%281%3D%29*+*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\|%281%3D%29*+*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 1] (7 matches) &
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\|%281%3D%29*\s*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\|%281%3D%29*\s*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 2] (6 matches).

sorry, could not mask urls correctly

Event Timeline

Herzi.Pinki raised the priority of this task from to Needs Triage.
Herzi.Pinki updated the task description. (Show Details)
Herzi.Pinki added a project: Commons.
Herzi.Pinki subscribed.
Herzi.Pinki renamed this task from \s does not match all spaces in cirrus search to \s regexp does not match all spaces in cirrus search.Jun 19 2015, 6:56 AM
Herzi.Pinki set Security to None.
Deskana subscribed.
MPhamWMF subscribed.

Closing out low/est priority tasks over 6 months old with no activity within last 6 months in order to clean out the backlog of tickets we will not be addressing in the near term. Please feel free to reopen if you think a ticket is important, but bare in mind that given current priorities and resourcing, it is unlikely for the Search team to pick up these tasks for the indefinite future. We hope that the requested changes have either been addressed by or made irrelevant by work the team has done or is doing -- e.g. upgrading Elasticsearch to a newer version will solve various ES-related problems -- or will be subsumed by future work in a more generalized way.

RhinosF1 removed a project: Discovery-Search.
RhinosF1 subscribed.

Re-opening tasks and removing from team workboard per IRC feedback given yesterday and discussion with MPham.