Page MenuHomePhabricator

list=search&srnamespaces causes odd error messages
Closed, ResolvedPublic

Description

Author: russblau

Description:
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srnamespace=0 works
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srnamespace=1 (or any other non-zero value) causes an error:

<api>

<error code="srsearch--disabled" info=" search is disabled">

...

Note that the error code itself is invalid.

Further, these errors are not always replicable: I had one query which gave me an error code=gsrsearch-text-disabled, and when I repeated the identical query a few minutes later I got a non-error response.


Version: 1.14.x
Severity: normal

Details

Reference
bz16548

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:28 PM
bzimport set Reference to bz16548.

I guess this is what happens when people change backend behavior without updating (all the) callers...

(In reply to comment #0)

http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srnamespace=0
works
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srnamespace=1
(or any other non-zero value) causes an error:

<api>

<error code="srsearch--disabled" info=" search is disabled">

...

Note that the error code itself is invalid.

The invalid error code was fixed in r44186. Now you'll always get either srsearch-text-disabled or srsearch-title-disabled.

Further, these errors are not always replicable: I had one query which gave me
an error code=gsrsearch-text-disabled, and when I repeated the identical query
a few minutes later I got a non-error response.

You mean that you intermittently get the weird error message or a normal result for the same query? I'm pretty sure that has to be a bug in the search backend.

Marking as FIXED for now, since the invalid error code was fixed and I'm pretty sure the intermittent weirdness is not a bug in the API, but in the search backend. If it persists, open a separate bug for it with Search or Lucene as component.