Skip to content

Backend work for regex mode toggle for Zoekt code search

What does this MR do and why?

Wrap the search term with double quotes if the param exact_search is passed. This feature is backed by a feature flag zoekt_exact_search with the user actor

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
before after

How to set up and validate locally

  • Setup Zoekt for a namespace
  • Make sure the checkbox Enable Zoekt code search under User Preferences is checked
  • Enable the feature flag zoekt_exact_search
Feature.enable(:zoekt_exact_search)
  • Perform a code search in the chosen namespace.
  • Open the zkt section in the performance bar. Ensure the searched term is wrapped with a double quote
  • Add a query param regex=true or regex=1 in the searched URL
  • Open the zkt section in the performance bar. Ensure the searched term is NOT wrapped with a double quote

Related to #434417 (closed)

Edited by Ravi Kumar

Merge request reports