Use by_search_level_and_membership filter for commit search

What does this MR do and why?

Add logic to use by_search_level_and_membership filter.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Verify the migration is completed: By running Elastic::DataMigrationService.migration_has_finished?(:backfill_traversal_ids_on_commits) in rails console.
  2. Enable the feature flag: By running Feature.enable(:search_commits_use_traversal_ids_query) in rails console.
  3. Do a group, global and project search for commits and Verify Elasticsearch queries no longer contain large project_ids lists from the performance bar.

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 #491215

Edited by Siddharth Dungarwal

Merge request reports

Loading