Area: UI
Sub-Area: Search Results
Applies to: OSS + Cloud
Issue
The search bar dropdown that appears as you type can show different results, or a different order, than the full search results page.
You Might Be Asking
- Why are my search dropdown results different from the full results page?
- How many results does the dropdown show?
- How do I get the dropdown to match the results page?
Cause
The dropdown does not always use the same search API as the results page. A server setting, searchBarConfig.apiVariant, picks one of two APIs:
-
Search API (
SEARCH_ACROSS_ENTITIES): the dropdown uses asearchAcrossEntities-style search. This is the default in OSS. -
Autocomplete API (
AUTOCOMPLETE_FOR_MULTIPLE): the dropdown usesautoCompleteForMultiple. Any unknown value also falls back to autocomplete.
Autocomplete has its own autocompleteConfigurations. These inherit the search scoring unless someone overrides them. See Customizing Search.
The two modes also behave differently as you type:
- In search mode, the dropdown runs a search only after you type 3 or more characters, or when filters are applied. It asks for up to 20 results.
- In autocomplete mode, 1 character is enough.
The dropdown and the results page are separate requests. DataHub does not guarantee that they return the same top results.
Solution
DataHub Cloud: You can't change the search bar mode yourself. Contact DataHub Support to ask which mode your instance uses.
Self-hosted: Set the SEARCH_BAR_API_VARIANT environment variable on GMS to SEARCH_ACROSS_ENTITIES so the dropdown uses the search API. If you have a custom search configuration, check whether it overrides the autocomplete scoring. See Customizing Search.
To see the full results, press Enter in the search bar. The search bar sends your query and filters to the results page.