Page MenuHomePhabricator

Create new message for overwritten queries when the original query has zero results
Closed, ResolvedPublic

Description

Current query suggestions ("did you mean") will only overwrite the original query if the original query gets zero results. However, the message "Search instead for <original query>" implies that the original query gets some results, even though clicking on it always gives no results (in the current version of search).

Create a new message that explicitly says there are zero results, maybe something like this:

  • Showing results for <suggested query>. No results found for <original query>.

Notes:

  • We should probably keep the link to the zero-result original query without suggestions in case anyone uses that in their workflow.
  • We will keep the existing message (and all its translations) for future use if we ever implement something to overwrite queries that have non-zero results.

[ Original discussion on-wiki ]

Event Timeline

EBernhardson moved this task from needs triage to Current work on the Discovery-Search board.

Change 558734 had a related patch set uploaded (by EBernhardson; owner: EBernhardson):
[mediawiki/core@master] Update search-rewritten i18n message to clarify how it is used in practice

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

Getting the right information into the DidYouMeanWidget to know that no results were available is a bit painful. Afaik this functionality has never been used when the original search term returned results, so with the goal of simply getting this done without adding unnecessary complexity I've updated the original message and documented on ISearchResultSet the assumption that result sets only use rewritten queries when the original query returned no results.

Change 558734 merged by jenkins-bot:
[mediawiki/core@master] Update search-rewritten i18n message to clarify how it is used in practice

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

May be a duplicate of T66413.

I believe that the primary goal of T66413 was to not show an empty results, which we no longer do, so I've closed that ticket. The wording there is better than the current wording, which is what this ticket aims to fix.