Page MenuHomePhabricator

Non-regex insource searches aren't reliable (for short character strings?)
Closed, InvalidPublic

Description

  1. This search hastemplate:columns finds 1900 pages.
  2. This search hastemplate:columns insource:col finds 172 pages (and many false positive patterns).
  3. This search hastemplate:columns insource:/\|col([456789]|10)/ currently finds 130 pages.
  4. This search hastemplate:columns insource:col insource:/col4/ finds 0 pages even though several of the immediately above pages meet the definition.
  5. This search hastemplate:columns insource:col4 finds 200 pages.
  6. This search hastemplate:columns insource:col4 insource:/\| *col4/ finds 200 pages also.

Now, all templates using Template:Columns are required to have at least one parameter in them with the name "col#", where # is from 1 to 10. So the dramatic difference between 1 and 2 is confusing. Is there some sort of failure on short strings when used with insource? Is it related to the bar or number (the overall length i.e. 3 characters rather than 4)?

The reason that this is a problem is that I've been relying on the trick of making it easier for the search system find parameters by including the primary searched-for string outside the regex.

Event Timeline

Izno updated the task description. (Show Details)
Izno updated the task description. (Show Details)

Pointed to en.wp Help:Search which indicates that insource without regex search is whole word only.

Oof.