Skip to content

search: use streaming search for suggestions instead of the GQL API

Administrator requested to merge rn/refactor-query-suggestions into main

Created by: novoselrok

Split from https://github.com/sourcegraph/sourcegraph/pull/25512

Fixes #24983 (closed)

Instead of using the SearchSuggestions GQL endpoint, I refactored the client suggestions to use streaming search endpoint. For example, to get suggestions for repo:source filter we transform the query into repo:source type:repo count:50 and use the search results as suggestions.

Notes:

  • ️ Support for context: suggestions has been removed because contexts are not an eligible search result type
  • ️ Support for repogroup: suggestions has been removed for the same reason as well

Merge request reports

Loading