Skip to content

Search repo ids via project ids in zoekt metadata

What does this MR do and why?

AI Summary

This change introduces a new feature flag called zoekt_search_meta_project_ids that allows GitLab's search system to use a different method for filtering search results by project.

When the feature flag is enabled, instead of using repository IDs to filter search results, the system will use project metadata with exact matching patterns. This provides a more precise way to search within specific projects. The change includes a new filtering method that creates exact match patterns for project IDs (like "^123$" for project 123) and combines multiple project searches using OR logic.

The feature is currently disabled by default and includes comprehensive tests to ensure both the new metadata-based approach and the existing repository ID approach work correctly. This appears to be part of improving GitLab's code search functionality, specifically for the Zoekt search engine, allowing for more accurate project-scoped searches.

References

Related to &18695

Screenshots or screen recordings

Before After

How to set up and validate locally

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.

Edited by John Mason

Merge request reports

Loading