Page MenuHomePhabricator

Can't create new article from search when including a quote in the search string
Open, LowPublic

Description

Expected behavior: I search for a string, and get shown message "searchmenu-new", offering me to create an article by that name.
Actual behavior: the message doesn't appear if the search string includes a quote mark.

Example: I try to create a new article named Don "King" Kong, and I do so by searching for that string:
https://en.wikipedia.org/w/index.php?search=Don+"King"+Kong
...I do not get the option to create an article of that name.
(Please note that a single quote anywhere in the string is enough to trigger this behavior)

This behavior seems to be triggered by flag $searchContainedSyntax, which I got lost tracking down in the source code. As far as I can tell, this is due to CirrusSearch; running a mediawiki-vagrant machine with vanilla search everything works as expected. I assume this is because vanilla search has no special search operators.

I'll totally understand if this is a WONTFIX...

Event Timeline

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptApr 20 2017, 8:50 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The message that suggests creating an article that doesn't exist is not shown if your search contained special syntax. This is to avoid nonsensical suggestions like You may create the page "insource:foo". Quotes are actually special syntax; if you put something in quotes, it will only show exact matches.

In general, I suspect that that message is useless for a variety of reasons, and could just be completely removed to declutter the page. I have no data to back that up.

Deskana triaged this task as Low priority.Apr 20 2017, 5:02 PM
Deskana moved this task from needs triage to later on... on the Discovery-Search board.

Yeah, I saw what it was for, but I guess in a perfect world it wouldn't
trigger for a single quote (which isn't special syntax) or for quotes
around a single word (which, again, isn't special syntax AFAIK).