Add Zoekt search syntax documentation link
What does this MR do and why?
This is a follow-up from !109345 (comment 1257324896), which adds documentation link to Zoekt syntax when we encounter an error.
This MR also adds a Syntax
section to the exact code search documentation page to make linking it easier. As we roll out Zoekt, we're going to add more examples and expand this section.
Screenshots or screen recordings
before | after |
---|---|
How to set up and validate locally
- Add these lines to your
gdk.yml
zoekt:
enabled: true
- Execute
gdk reconfigure
- Run these commands in you rails console to add the
flightjs
namespace to Zoekt
::Feature.enable(:index_code_with_zoekt)
::Feature.enable(:search_code_with_zoekt)
zoekt_shard = ::Zoekt::Shard.find_or_create_by!(index_base_url: 'http://127.0.0.1:6080/', search_base_url: 'http://127.0.0.1:6090/')
namespace = Namespace.find_by_full_path("flightjs") # Some namespace you want to enable
::Zoekt::IndexedNamespace.find_or_create_by!(shard: zoekt_shard, namespace: namespace.root_ancestor)
- Change the visibility of the flightjs project to public
- Make code changes to any project in the namespace you indexed to ensure the index gets updated
- Perform search in a project inside the
flightjs
namespace using*
as a term. - You should see the error page with the documentation link
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #389946 (closed)
Edited by Dmitry Gruzd