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 created this task.Mar 1 2015, 10:46 PM
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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 1 2015, 10:46 PM
Reedy set Security to None.
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
jeremyb-phone updated the task description. (Show Details)Jun 1 2015, 3:53 AM
jeremyb added a subscriber: jeremyb.Jun 1 2015, 3:58 AM

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

Josve05a triaged this task as Low priority.Aug 22 2015, 11:38 PM

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...

Anomie added a subscriber: Anomie.Sep 8 2015, 1:29 PM

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-API.
Anomie removed a subscriber: Anomie.

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
jayvdb added a subscriber: jayvdb.Jan 13 2016, 3:31 AM
jayvdb updated the task description. (Show Details)Jan 13 2016, 3:39 AM

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

Restricted Application added a project: Discovery-Search. · View Herald TranscriptJul 31 2016, 11:44 PM
Deskana added a subscriber: Deskana.

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 closed this task as Resolved.Jul 22 2017, 1:11 PM
Rjwilmsi claimed this task.
Rjwilmsi added a subscriber: Rjwilmsi.

Fixed by rev 12122 for T147291