Group/Global search should not show code tab if no zoekt nodes are available & advanced search is off
What does this MR do and why?
This change improves how the search system determines when to use Zoekt (a code search engine). Previously, when no specific project or group was provided, the system would just check the zoekt_settings.zoekt_search_enabled?. Now it also checks if any active Zoekt search nodes are running before deciding to use it. The code also simplifies some logic by removing unnecessary conditional statements and makes the search availability check more accurate by verifying that search nodes are actually online and ready to handle requests.
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Disable search with elasticsearch
- Stop the gdk zoekt services
- Perform a global search
- Code search tab should not be visible
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #543756 (closed)
Edited by Ravi Kumar

