Page MenuHomePhabricator

Searching for term within quotation marks returns three incorrect results
Closed, ResolvedPublic

Description

Searching for "Foo" (with quotes), which AWB sends to the API as

https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch='%22Foo%22'&srlimit=max

results in the first result being Quotation mark

Quotation mark
Foobar
Foo (disambiguation)
Foo-foo
Foo Fighters

Desktop example: https://en.wikipedia.org/wiki/Special:Search/%27%22Foo%22%27

Reported at https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:AutoWikiBrowser/Bugs&oldid=649441814#Any_Wiki_search_.28text.29_returns_Quotation_mark

I've got a feeling this might actually be some form of a dupe. CC'ing @GoingBatty who filed it against AWB originally

Event Timeline

Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy added a project: AutoWikiBrowser.
Reedy added subscribers: Reedy, GoingBatty.
Reedy renamed this task from Wiki to API search for term including "" returns Quotation mark article as first result.Mar 1 2015, 11:12 PM

so then when you search for "Foo" in AWB it actually searches for '"Foo"'
instead? why?

Per Josve05a's mention, this example returns a typographical dash (--) in the list as well.

The first three results are now "Quotation mark", "Dash", and "--"

I hadn't noticed 'Dash' because I keep my list sorted.

At any rate, I would say this is quite an annoyance.

The problem comes from API. So nothing we can really do from our side...

The problem comes from API. So nothing we can really do from our side...

This has nothing to do with the API either, the API is just returning what it is given by the search backend. This is also shown by the fact that https://en.wikipedia.org/wiki/Special:Search/'%22Foo%22' returns the same results.

Anomie renamed this task from API search for term including "" returns Quotation mark article as first result to Search for term including "" returns Quotation mark article as first result.Sep 8 2015, 1:30 PM
Anomie removed a project: MediaWiki-Action-API.
Anomie unsubscribed.

You are right. Not AWB's fault neither though.

GoingBatty renamed this task from Search for term including "" returns Quotation mark article as first result to Searching for term within quotation marks returns three incorrect results.Sep 9 2015, 10:50 PM

so then when you search for "Foo" in AWB it actually searches for '"Foo"'
instead? why?

It seems this question hasnt been answered.

If the user searches for "Foo" ...

AWB should be using this URL: https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch=%22Foo%22&srlimit=max

Not : https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch=%27%22Foo%22%27&srlimit=max

Deskana subscribed.

Removing Discovery-Search (Current work) as this primarily appears to be a problem with a client's encoding rather than anything on our end.

Rjwilmsi claimed this task.
Rjwilmsi subscribed.

Fixed by rev 12122 for T147291