Page MenuHomePhabricator

Search shouldn't display misleading "No results found" if there is an error in the search backend
Closed, ResolvedPublic2 Estimated Story Points

Description

If the search api reports an error (e.g. "search backend too busy"), the app shows a misleading "No results found" and doesn't show the info reported by the api. This should be fixed, we had some tickets in our OTRS support queue, because of a search backend failure (related T102463 and the doc of it) with the question, why all search queries reports, that there aren't matches.

The api response was (i remember, that we're using search and not prefixsearch anymore, but i'm not sure :)):

{
    "servedby": "mw1121",
    "error": {
        "code": "srsearch-error",
        "info": "Search is currently too busy.  Please try again later.",
        "*": "See https://en.wikipedia.org/w/api.php for API usage"
    }
}

Event Timeline

Florian raised the priority of this task from to High.
Florian updated the task description. (Show Details)
Florian added subscribers: Florian, Krenair, bearND, Dbrant.
Florian set Security to None.

Good point.

The api response was (i remember, that we're using search and not prefixsearch anymore, but i'm not sure :)):

BTW: We're using both: first prefix search then full text search.

@Florian, Do you know how we can simulate the conditions that would produce this kind of error?

Force your wiki to always send that error as the response?

Change 221821 had a related patch set uploaded (by Dbrant):
Add custom View for displaying errors consistently.

https://gerrit.wikimedia.org/r/221821

I haven't tested it, but stop the elasticsearch service should be enough, too.

Change 221821 merged by jenkins-bot:
Add custom View for displaying errors consistently.

https://gerrit.wikimedia.org/r/221821

Vibhabamba subscribed.

Reviewed this @Dbrant
Signed off by Design.

Rationale for the cryptic error messages: We have recently had a lot of issues around search and this will improve debugging when users report complaints. They may not be able to understand it, but its a valid fix for this period when we are seeing a lot of issues around search.