Skip to content

"did you mean" suggestions and lucky search interpretations overlap

Created by: lguychard

Definitions

"Did you mean" suggestions are static, computed client-side, that suggest alternative queries the user may want to run. They are currently limited to offering the addition of a lang: filter when the first or the last token of a search query that does not contain filters is a literal matching a known language name.

Example query

image

"Lucky search interpretations" are server-side, dynamically computed alternative interpretations, which are run when the original query does not return enough results, and whose results are merged in with the original result set.

Example query

image

Problem

There is a potential overlap between lucky and did you mean suggestions. Due to this overlap, both types of suggestions may be displayed at the same time, which can be confusing, especially given they are fundamentally different in nature ("did you mean" suggested queries may still return no results; Lucky search interpretations are guaranteed to have results).

Example query.

image

Additional context and constraints

  • The lang: use case is the only point of overlap between both suggestion types
  • In their current implementations, "did you mean" suggestions are displayed ahead of any results being shown, and without awareness of the result count.
  • 'Did you mean' suggestions are not constrained to being shown above search results; they could be integrated closer to the editing experience, as diagnostics with quick fixes, if we decided that made more sense (example of diagnostics with quick fixes)
  • The set of lucky search rules we will ship is still being evaluated. An option here could simply be to remove the lang: suggestion from lucky search, but that would not necessarily fully remove the overlap (python config timer override would still display both a lucky and a 'did you mean' suggestion).

Open questions

  • Given that 'did you mean' suggestions are not guaranteed to return results, are they still useful or necessary in a world where we have lucky search?
  • If we determine that 'did you mean' suggestions are necessary, are they presented in the most effective way given their purpose?
  • If we decide that both suggestion types have their place in their current form, and opt to eliminate the overlap between 'did you mean' and lucky suggestions, what should the cutoff be between suggestion types?