search: use streaming search for suggestions instead of the GQL API
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 forcontext:
suggestions has been removed because contexts are not an eligible search result type -
⚠ ️ Support forrepogroup:
suggestions has been removed for the same reason as well